Skip to content

Instantly share code, notes, and snippets.

@tf0054
Created March 22, 2012 14:49
Show Gist options
  • Save tf0054/2158752 to your computer and use it in GitHub Desktop.
Save tf0054/2158752 to your computer and use it in GitHub Desktop.
Hack#38
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;
private String name;
private int age;
private String job;
public Person(String id , String name , int age , String job){
this.id = id;
this.name = name;
this.age = age;
this.job = job;
}
}
public Person evaluate(String id , String name , int age , String job){
return new Person(id , name , age , job);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment