private String hexDump(byte[] ba) {
      StringBuilder sb = new StringBuilder();
      byte[] arr = ba;
      int len = ba.length;

      for(int i = 0; i < len; ++i) {
        byte b = arr[i];
        if(b > 32 && b < 126) {
          sb.append((char)b);
        } else {
          sb.append(String.format("x%02x", new Object[]{Byte.valueOf(b)}));
        }
      }

      return sb.toString();
    }
Extension of AccumuloOutputFormat to support indexing.
accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/mr/AccumuloIndexedOutputFormat.java