Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # dev >> Setting Charset in getBytes() call.


Copy link to this message
-
Re: Setting Charset in getBytes() call.
Re-reading and re-thinking I can see your point about how, by
specifying UTF-8, Accumulo is now flouting the file.encoding
parameter. I'd like to implement a static method inside
core/src/main/java/org/apache/accumulo/core/util/Encoding.java. Then
do something like getBytes(Encoding.getCharset()) instead of
hard-coding UTF-8.

Class Encoding {
  private static final Charset charset = null;
  public Charset getCharset() {
    if (charset == null) {
      charset = Charset.forName(System.getProperty("file.encoding", "UTF-8"));
    }
    return charset;
  }
  ...
}
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB