Skip to content

Instantly share code, notes, and snippets.

executing pwd:
/home/hadoop
executing /usr/bin/spark-submit --class com.truex.prometheus.CLIJob Prometheus-assembly-0.0.1.jar -e 'select x.id, x.title, x.description, x.mediaavailableDate as available_date, x.mediaexpirationDate as expiration_date, mediacategories.medianame as media_name, x.mediakeywords as keywords, mediaratings.scheme as rating_scheme, mediaratings.rating, cast(mediaratings.subRatings as String) as sub_ratings, content.plfileduration as duration, x.plmediaprovider as provider, x.ngccontentAdType as ad_type, x.ngcepisodeNumber as episode, ngcnetwork as network, x.ngcseasonNumber as season_number, x.ngcuID as ngc_uid, x.ngcvideoType as video_type from etl lateral view explode(entries) entries as x lateral view explode(x.mediacategories) cat as mediacategories lateral view explode(x.mediaratings) r as mediaratings lateral view explode(x.mediacontent) mediacontent as content lateral view outer explode(x.ngcnetwork) net as ngcnetworkr' -j http://feed.theplatform.com/f/ngc/ngcngw-analytics /tmp/t
scala> textFile.count()
15/09/21 23:19:17 INFO FileInputFormat: Total input paths to process : 1
15/09/21 23:19:17 INFO SparkContext: Starting job: count at <console>:24
15/09/21 23:19:18 INFO DAGScheduler: Got job 0 (count at <console>:24) with 2 output partitions (allowLocal=false)
15/09/21 23:19:18 INFO DAGScheduler: Final stage: ResultStage 0(count at <console>:24)
15/09/21 23:19:18 INFO DAGScheduler: Parents of final stage: List()
15/09/21 23:19:18 INFO DAGScheduler: Missing parents: List()
15/09/21 23:19:18 INFO DAGScheduler: Submitting ResultStage 0 (MapPartitionsRDD[1] at textFile at <console>:21), which has no missing parents
15/09/21 23:19:18 INFO MemoryStore: ensureFreeSpace(2960) called with curMem=116570, maxMem=278302556
15/09/21 23:19:18 INFO MemoryStore: Block broadcast_1 stored as values in memory (estimated size 2.9 KB, free 265.3 MB)
#!/usr/bin/env ruby
#
# Checks the number of in service nodes in an AWS ELB
# ===
#
# DESCRIPTION:
# This plugin checks an AWS Elastic Load Balancer to ensure a minimum number
# or percentage of nodes are InService on the ELB
#
# PLATFORMS:
upstream my_domain {
server unix:///home/ubuntu/apps/my_old_domain/shared/puma/my_old_domain.sock;
}
server {
listen 80;
server_name my.old_domain.com;
return 301 http://my.new_domain.com$request_uri;
}
"host": "myhostname",
"port": 5671,
"vhost": "/sensu",
"user": "sensu",
"password": "password",
"ssl": {
"cert_chain_file": "/etc/sensu/ssl/cert.pem",
"private_key_file": "/etc/sensu/ssl/key.pem"
}
## Cornice migration phase one
ALTER TABLE engagements ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE engagement_interactions ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE tracking_events ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE tracking_events ADD COLUMN creative_id integer DEFAULT NULL encode RAW;
ALTER TABLE partner_revenue_events ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE advertiser_cost_events ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE session_recordings ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE engagement_quality_calculations ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
ALTER TABLE feedbacks ADD COLUMN campaign_id integer DEFAULT NULL encode RAW;
RuntimeError: Digest::Base cannot be directly inherited in Ruby
[2014-08-12T11:39:54-07:00] DEBUG: Re-raising exception: RuntimeError - Digest::Base cannot be directly inherited in Ruby
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/digester.rb:51:in `new'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/digester.rb:51:in `generate_md5_checksum_for_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/digester.rb:47:in `generate_md5_checksum_for_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook_version.rb:76:in `checksum_cookbook_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook/synchronizer.rb:224:in `cached_copy_up_to_date?'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook/synchronizer.rb:211:in `sync_file'
/usr/local/lib/ruby/gems/2.1.0/gems/chef-11.14.2/lib/chef/cookbook/synchronizer.rb:141:in `block (2 levels) in sync_cookbooks'
deploy node[:deploy_root] do
repo "git@github.com:xxxxxxx/#{node[:app_name]}.git"
revision rev
user "ubuntu"
group "ubuntu"
enable_submodules true
migrate false
symlink_before_migrate({ "config/dot_env" => ".env"})
environment "RAILS_ENV" => node[:rails_env]
shallow_clone true
%w(rsyslog rsyslog-gnutls).each do |p|
package p do
action :install
options "--force-yes"
end
end
[2013-09-09T11:37:56-07:00] DEBUG: package[rsyslog] current version is 5.8.6-1ubuntu8.4
[2013-09-09T11:37:56-07:00] DEBUG: package[rsyslog] candidate version is 7.4.4-0adiscon1
[2013-09-09T11:37:56-07:00] DEBUG: package[rsyslog] is already installed - nothing to do!
# provider
action :set do
chef_config = ""
if node[:ec2][:userdata]
chef_config = JSON.parse(node[:ec2][:userdata])
if chef_config.kind_of?(Hash)
chef_config = chef_config["attributes"]["run_list"]
if chef_config.kind_of?(Array)
chef_config = chef_config.first.split(/\[|\]/).last.gsub("_","-")
end