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
----- 手直ししたバージョン ----- | |
summary: | |
utc_from_timestamp and utc_to_timestamp returns incorrect results. | |
detail: | |
how to reproduce: | |
{noformat} | |
$ echo "2011-12-25 09:00:00.123456" > /tmp/data5.txt |
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 MurmurHash1 { | |
public long digest(byte[] data, int seed, boolean bigendian) { | |
int m = 0xc6a4a793; | |
int r = 16; | |
int len = data.length; | |
int h = seed ^ (len * m); |
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 EncodeUtils { | |
public static long toLongBE(byte[] b, int offset) { | |
return (((long)b[offset+0] << 56) + | |
((long)(b[offset+1] & 255) << 48) + | |
((long)(b[offset+2] & 255) << 40) + | |
((long)(b[offset+3] & 255) << 32) + | |
((long)(b[offset+4] & 255) << 24) + | |
((b[offset+5] & 255) << 16) + |
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 EncodeUtils { | |
public static int toIntBE(byte[] b, int i) { | |
return ((b[i+0] << 24) + (b[i+1] << 16) + (b[i+2] << 8) + (b[i+3] << 0)); | |
} | |
public static int toIntLE(byte[] b, int i) { | |
return ((b[i+3] << 24) + (b[i+2] << 16) + (b[i+1] << 8) + (b[i+0] << 0)); | |
} | |
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
Index: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java | |
=================================================================== | |
--- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (revision 1304983) | |
+++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (working copy) | |
@@ -6468,10 +6468,8 @@ | |
// Finally add the partitioning columns | |
for (FieldSchema part_col : tab.getPartCols()) { | |
LOG.trace("Adding partition col: " + part_col); | |
- // TODO: use the right type by calling part_col.getType() instead of | |
- // String.class |
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
abstract class Base { | |
protected String aaa; | |
public Base setAaa(String aaa) { | |
this.aaa = aaa; | |
return this; | |
} | |
} | |
class Hoge extends Base { | |
protected String xxx; |
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
Rest call: | |
/_api/collection/collection-identifier/parameter | |
I got follows error: | |
{"error":true,"code":404,"errorNum":404,"errorMessage":"expecting one of the resources 'count', 'figures'"} | |
[tamtam@tamsvr20 tmp]$ curl -X GET --dump - http://localhost:8529/_api/collection/tamtam | |
HTTP/1.1 200 OK | |
connection: Keep-Alive | |
content-type: application/json |
OlderNewer