cd $HIVE_HOME
# パッチをあててビルド
wget https://issues.apache.org/jira/secure/attachment/12577210/HIVE-4299.patch
patch -p0 < HIVE-4299.patch
ant clean package
# テストの内容作成(.qファイルを使ったpositiveテスト)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-02-21 14:07:09,310 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:SIMPLE) cause:java.net.SocketTimeoutException: Read timed out | |
2013-02-21 14:07:09,310 ERROR org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Exception in doCheckpoint | |
java.net.SocketTimeoutException: Read timed out | |
at java.net.SocketInputStream.socketRead0(Native Method) | |
at java.net.SocketInputStream.read(SocketInputStream.java:129) | |
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256) | |
at java.io.BufferedInputStream.read(BufferedInputStream.java:317) | |
at java.io.FilterInputStream.read(FilterInputStream.java:116) | |
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2672) | |
at java.security.DigestInputStream.read(DigestInputStream.java:144) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.11</version> | |
<scope>test</scope> | |
<exclusions> | |
<exclusion> | |
<artifactId>hamcrest-core</artifactId> | |
<groupId>org.hamcrest</groupId> | |
</exclusion> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyFactory { | |
public static Configuration newConfiguration() { | |
Configuration conf = new Configuration(); | |
conf.setInt("xxx", 111); | |
return conf; | |
} | |
} | |
// こーいう場合(Factoryクラスがstaticメソッドでかつ他のクラスの場合) XMLどう書けばいいの... | |
// factory-beanはbean指定だからインスタンス化必須? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'json' | |
require 'yajl' | |
x = eval('{"logType"=>"ads", "abc"=>"\xE3\x82\xA4\xE3\x83\xB3\xE3\x82\xB9\xE3\x83\x88\xE3\x83\xBC\xE3\x83\xAB", "time"=>"2015-05-17T03:00:00Z", "tag"=>"aaa"}') | |
puts x["abc"].force_encoding("ASCII-8BIT") | |
puts x["abc"].encoding | |
puts x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2015-07-11T00:40:12+00:00] ERROR: service[td-agent] (td-agent::default line 119) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' | |
---- Begin output of /sbin/service td-agent start ---- | |
STDOUT: Starting td-agent: [FAILED] | |
STDERR: /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate googleauth-0.4.1, because multi_json-1.11.1 conflicts with multi_json (= 1.11) (Gem::LoadError) | |
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate' | |
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:780:in `block in activate_dependencies' | |
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:766:in `each' | |
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:766:in `activate_dependencies' | |
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:750:in `activate' | |
from /usr/lib64/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'json' | |
rand = Random.new | |
i = 0 | |
while true do | |
i += 1 | |
obj = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):007:0* require 'Oj' | |
=> false | |
irb(main):008:0> Oj.load('{"x": 1e-314}') | |
=> {"x"=>0.0} | |
irb(main):009:0> Oj.default_options = { :bigdecimal_load => :bigdecimal } | |
=> {:bigdecimal_load=>:bigdecimal} | |
irb(main):010:0> Oj.load('{"x": 1e-314}') | |
=> {"x"=>#<BigDecimal:7fd73a87d188,'0.1E-313',9(18)>} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'json' | |
def get_bqtype(k, obj) | |
return case obj | |
when TrueClass, FalseClass then "BOOLEAN" | |
when String then "STRING" | |
when Float then "FLOAT" | |
when Fixnum, Bignum | |
return "TIMESTAMP" if ["timestamp", "_ts"].include?(k) |