Home | About | Sematext search-lucene.com search-hadoop.com
 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.
I've looked at every getBytes() call. I have changed 82 files to use
getBytes(utf8). Each files uses the following Charset declaration.

    private static final Charset utf8 = Charset.forName("UTF8");

If at some future time the Charset should be changed or another
approach is decided upon, simply search for that string and
refactoring will be straightforward.

The attached file shows how I performed the search for getBytes() and
has a list of files that continue to have getBytes() because it is
called on a Text or some other kind of object. The code just prints a
list of files using getBytes(). Then I manually reviewed the files,
made changes or added the file name to the ignore list.

The code compiles and the tests run. I don't see any reason why I
should not commit my work to the trunk for v1.5.0. I don't want to
cause disharmony but I can't see the harm. And even if my change
causes some problem, wouldn't it be better to know that while v1.5.0
is still being actively developed?