@Test public void testHashFolder() { assertEquals( "aa/bb", ExtractMapper.hashFolder("aabbccddeeff00112233445566778899") ); }
public static String hashFolder(String hash) { final StringBuilder hashPathBuf = new StringBuilder(); hashPathBuf.setLength(0); hashPathBuf.append(hash.substring(0, 2)); hashPathBuf.append("/"); hashPathBuf.append(hash.substring(2, 4)); return hashPathBuf.toString(); }
ExtractMapper extends Mapper<NullWritable,FileSplit,ImmutableBytesWritable,KeyValue> { public static String hashFolder(String hash) { final StringBuilder hashPathBuf = new StringBuilder(); hashPathBuf.setLength(0); hashPathBuf.append(hash.substring(0, 2)); hashPathBuf.append("/"); hashPathBuf.append(hash.substring(2, 4)); return hashPathBuf.toString(); } }
ExtractMapper extends Mapper<NullWritable,FileSplit,ImmutableBytesWritable,KeyValue> { public static String hashFolder(String hash) { final StringBuilder hashPathBuf = new StringBuilder(); hashPathBuf.setLength(0); hashPathBuf.append(hash.substring(0, 2)); hashPathBuf.append("/"); hashPathBuf.append(hash.substring(2, 4)); return hashPathBuf.toString(); }  }
ExtractMapper extends Mapper<NullWritable,FileSplit,ImmutableBytesWritable,KeyValue> { public static String hashFolder(String hash) { final StringBuilder hashPathBuf = new StringBuilder(); hashPathBuf.setLength(0); hashPathBuf.append(hash.substring(0, 2)); hashPathBuf.append("/"); hashPathBuf.append(hash.substring(2, 4)); return hashPathBuf.toString(); }  static String hashFolder(String hash); }
ExtractMapper extends Mapper<NullWritable,FileSplit,ImmutableBytesWritable,KeyValue> { public static String hashFolder(String hash) { final StringBuilder hashPathBuf = new StringBuilder(); hashPathBuf.setLength(0); hashPathBuf.append(hash.substring(0, 2)); hashPathBuf.append("/"); hashPathBuf.append(hash.substring(2, 4)); return hashPathBuf.toString(); }  static String hashFolder(String hash);  }