This file contains hidden or 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
| package org.hadoophacks.pig; | |
| import org.apache.pig.LoadFunc; | |
| import org.apache.pig.data.Tuple; | |
| import org.apache.pig.data.DataByteArray; | |
| import org.apache.pig.data.TupleFactory; | |
| import org.apache.pig.backend.executionengine.ExecException; | |
| import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit; | |
| import org.apache.hadoop.mapreduce.Job; | |
| import org.apache.hadoop.mapreduce.RecordReader; |
This file contains hidden or 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
| package org.hadoophacks.pig; | |
| import java.io.IOException; | |
| import org.apache.pig.FilterFunc; | |
| import org.apache.pig.data.Tuple; | |
| import org.apache.pig.backend.executionengine.ExecException; | |
| public class MyMatches extends FilterFunc{ |
This file contains hidden or 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
| package org.hadoophacks.pig2; | |
| import org.apache.pig.EvalFunc; | |
| import org.apache.pig.data.Tuple; | |
| import org.apache.pig.data.DataType; | |
| import org.apache.pig.backend.executionengine.ExecException; | |
| import org.apache.pig.impl.logicalLayer.schema.Schema; | |
| import org.apache.pig.impl.logicalLayer.FrontendException; | |
| import java.io.IOException; | |
| import java.util.List; |
This file contains hidden or 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
| package org.hadoophacks.pig; | |
| import org.apache.pig.EvalFunc; | |
| import org.apache.pig.data.Tuple; | |
| import org.apache.pig.data.DataType; | |
| import org.apache.pig.backend.executionengine.ExecException; | |
| import org.apache.pig.impl.logicalLayer.schema.Schema; | |
| import org.apache.pig.impl.logicalLayer.FrontendException; | |
| import java.io.IOException; | |
| import java.util.List; |
This file contains hidden or 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
| package org.hadoophacks.hive; | |
| import org.apache.hadoop.hive.ql.exec.UDF; | |
| import org.apache.hadoop.hive.serde2.io.DoubleWritable; | |
| import java.util.*; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.io.IntWritable; | |
| public class Multiply extends UDF{ |
This file contains hidden or 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
| package org.hadoophacks.hive; | |
| import org.apache.hadoop.hive.ql.exec.*; | |
| import org.apache.hadoop.io.*; | |
| public class CreatePerson extends UDF{ | |
| private static class Person{ | |
| private String id; |
This file contains hidden or 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
| package org.hadoophacks.hive; | |
| import org.apache.hadoop.hive.serde2.io.DoubleWritable; | |
| import org.apache.hadoop.io.IntWritable;; | |
| import org.apache.hadoop.hive.ql.exec.*; | |
| public class Average extends UDAF{ | |
| /** | |
| * | |
| *途中計算結果を格納しておくクラス |
This file contains hidden or 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
| package org.hadoophacks.mapreduce.lib.input; | |
| import java.io.IOException; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.mapreduce.InputSplit; | |
| import org.apache.hadoop.mapreduce.RecordReader; | |
| import org.apache.hadoop.mapreduce.TaskAttemptContext; | |
| import org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat; | |
| import org.apache.hadoop.mapreduce.lib.input.CombineFileRecordReader; | |
| import org.apache.hadoop.mapreduce.lib.input.CombineFileSplit; |
This file contains hidden or 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
| package org.hadoophacks.mapreduce.lib.input; | |
| import java.io.IOException; | |
| import org.apache.hadoop.conf.Configuration; | |
| import org.apache.hadoop.fs.FSDataInputStream; | |
| import org.apache.hadoop.fs.FileSystem; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.io.compress.CompressionCodec; | |
| import org.apache.hadoop.io.compress.CompressionCodecFactory; |
This file contains hidden or 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
| package org.hadoophacks.mapreduce; | |
| import java.io.IOException; | |
| import java.util.Iterator; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.util.Tool; | |
| import org.apache.hadoop.util.ToolRunner; | |
| import org.apache.hadoop.conf.Configured; | |
| import org.apache.hadoop.conf.Configuration; |