Created
March 22, 2012 14:49
-
-
Save tf0054/2158752 to your computer and use it in GitHub Desktop.
Hack#38
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
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