public Text evaluate(IntWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
StringHex(int colNum, int outputColumnNum) { super(colNum, outputColumnNum, (IUDFUnaryString) new UDFHex()); } }
public void testHexConversion(){ byte[] bytes = "string".getBytes(); // Let's make sure we only read the relevant part of the writable in case of reuse byte[] longBytes = "longer string".getBytes(); BytesWritable writable = new BytesWritable(longBytes); writable.set(bytes, 0, bytes.length); UDFHex udf = new UDFHex(); Text text = udf.evaluate(writable); String hexString = text.toString(); assertEquals("737472696E67", hexString); } }
public Text evaluate(LongWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
StringHex(int colNum, int outputColumn) { super(colNum, outputColumn, (IUDFUnaryString) new UDFHex()); } }
public Text evaluate(LongWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
StringHex(int colNum, int outputColumn) { super(colNum, outputColumn, (IUDFUnaryString) new UDFHex()); } }
/** * Convert every character in s to two hex digits. * */ public Text evaluate(Text s) { if (s == null) { return null; } byte[] str = s.getBytes(); return evaluate(str, s.getLength()); }
public Text evaluate(IntWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
/** * Convert every character in s to two hex digits. * */ public Text evaluate(Text s) { if (s == null) { return null; } byte[] str = s.getBytes(); return evaluate(str, s.getLength()); }
/** * Convert bytes to a hex string */ public Text evaluate(BytesWritable b){ if (b == null) { return null; } byte[] bytes = b.getBytes(); return evaluate(bytes, b.getLength()); }
/** * Convert bytes to a hex string */ public Text evaluate(BytesWritable b){ if (b == null) { return null; } byte[] bytes = b.getBytes(); return evaluate(bytes, b.getLength()); }
public Text evaluate(IntWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
public Text evaluate(LongWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
public Text evaluate(IntWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
public Text evaluate(LongWritable n) { if (n == null) { return null; } return evaluate(n.get()); }
/** * Convert every character in s to two hex digits. * */ public Text evaluate(Text s) { if (s == null) { return null; } byte[] str = s.getBytes(); return evaluate(str, s.getLength()); }
/** * Convert bytes to a hex string */ public Text evaluate(BytesWritable b){ if (b == null) { return null; } byte[] bytes = b.getBytes(); return evaluate(bytes, b.getLength()); }