You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hiroshi Ikeda (JIRA)" <ji...@apache.org> on 2012/11/08 12:09:12 UTC
[jira] [Created] (HBASE-7128) Reduced annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Hiroshi Ikeda created HBASE-7128:
------------------------------------
Summary: Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
Key: HBASE-7128
URL: https://issues.apache.org/jira/browse/HBASE-7128
Project: HBase
Issue Type: Improvement
Reporter: Hiroshi Ikeda
Priority: Trivial
There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493733#comment-13493733 ]
Hadoop QA commented on HBASE-7128:
----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12552763/HBASE-7128-V2.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 21 new or modified tests.
{color:green}+1 hadoop2.0{color}. The patch compiles against the hadoop 2.0 profile.
{color:red}-1 javadoc{color}. The javadoc tool appears to have generated 87 warning messages.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:red}-1 findbugs{color}. The patch appears to introduce 16 new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:green}+1 core tests{color}. The patch passed unit tests in .
Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3282//console
This message is automatically generated.
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (HBASE-7128) Reduce annoying catch clauses
of UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497884#comment-13497884 ]
Ted Yu edited comment on HBASE-7128 at 11/15/12 3:31 PM:
---------------------------------------------------------
I have attached an addendum.
was (Author: yuzhihong@gmail.com):
Can you attach an addendum ?
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: 7128-addendum.txt, HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HBASE-7128:
--------------------------
Attachment: 7128-addendum.txt
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: 7128-addendum.txt, HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduced annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493352#comment-13493352 ]
stack commented on HBASE-7128:
------------------------------
[~ikeda] Thank you for doing this.
HConstants should not reference Bytes -- a class in top level package reference a subpackage class (I don't mind double define of UTF8_ENCODING if you have to)
Otherwise, the patch is great.
> Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ----------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "stack (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496004#comment-13496004 ]
stack commented on HBASE-7128:
------------------------------
+1 on patch. Its good that the added methods to HConstants are private.
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496848#comment-13496848 ]
Hudson commented on HBASE-7128:
-------------------------------
Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #259 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/259/])
HBASE-7128 Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8 (Hiroshi) (Revision 1408758)
Result = FAILURE
tedyu :
Files :
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/GroupingTableMap.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/GroupingTableMapper.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogUtil.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestPrefixFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduce.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498109#comment-13498109 ]
Hadoop QA commented on HBASE-7128:
----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12553659/7128-addendum.txt
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 3 new or modified tests.
{color:green}+1 hadoop2.0{color}. The patch compiles against the hadoop 2.0 profile.
{color:red}-1 javadoc{color}. The javadoc tool appears to have generated 93 warning messages.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:red}-1 findbugs{color}. The patch appears to introduce 16 new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:red}-1 core tests{color}. The patch failed these unit tests:
org.apache.hadoop.hbase.master.TestSplitLogManager
Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3344//console
This message is automatically generated.
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: 7128-addendum.txt, HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497884#comment-13497884 ]
Ted Yu commented on HBASE-7128:
-------------------------------
Can you attach an addendum ?
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498175#comment-13498175 ]
Hudson commented on HBASE-7128:
-------------------------------
Integrated in HBase-TRUNK #3546 (See [https://builds.apache.org/job/HBase-TRUNK/3546/])
HBASE-7128 Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8, addendum (Revision 1409881)
Result = FAILURE
tedyu :
Files :
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Assignee: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: 7128-addendum.txt, HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HBASE-7128:
--------------------------
Resolution: Fixed
Assignee: Hiroshi Ikeda
Status: Resolved (was: Patch Available)
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Assignee: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: 7128-addendum.txt, HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hiroshi Ikeda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497809#comment-13497809 ]
Hiroshi Ikeda commented on HBASE-7128:
--------------------------------------
Oops, I find that HBaseTestCase still uses UTF8_ENCODING:
{code}
private void init() {
conf = HBaseConfiguration.create();
try {
START_KEY = new String(START_KEY_BYTES, HConstants.UTF8_ENCODING);
} catch (UnsupportedEncodingException e) {
LOG.fatal("error during initialization", e);
fail();
}
}
{code}
What should I do?
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-7128) Reduced annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HBASE-7128:
--------------------------
Fix Version/s: 0.96.0
Status: Patch Available (was: Open)
> Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ----------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498131#comment-13498131 ]
Ted Yu commented on HBASE-7128:
-------------------------------
Addendum integrated to trunk.
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: 7128-addendum.txt, HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496234#comment-13496234 ]
Ted Yu commented on HBASE-7128:
-------------------------------
Integrated to trunk.
Thanks for the patch, Hiroshi.
Thanks for the review, Stack.
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-7128) Reduced annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hiroshi Ikeda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiroshi Ikeda updated HBASE-7128:
---------------------------------
Attachment: HBASE-7128.patch
Added a patch.
This also breaks dependency from Bytes to HConstants in order to avoid confusion caused by their mutual calls in their initialization.
> Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ----------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Attachments: HBASE-7128.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduced annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493312#comment-13493312 ]
Ted Yu commented on HBASE-7128:
-------------------------------
In HConstants:
{code}
+ /** When we encode strings, we always specify UTF8 encoding */
+ public static final Charset UTF8_CHARSET = Bytes.UTF8_CHARSET;
{code}
HConstants and Bytes classes are both in hbase-common
Can UTF8_CHARSET be removed from HConstants ?
Patch looks good.
> Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ----------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-7128) Reduced annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hiroshi Ikeda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiroshi Ikeda updated HBASE-7128:
---------------------------------
Attachment: HBASE-7128-V2.patch
Added a revised patch.
Fixed the code and reversed the dependency of the previous patch (The current dependency is: HConstants <- Bytes).
Now UTF8_ENCODING and UTF8_CHARSET only exist in HConstants, and Bytes refers to them.
Thanks for reviews.
> Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ----------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HBASE-7128:
--------------------------
Summary: Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8 (was: Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8)
Hadoop Flags: Reviewed
Patch v2 looks good.
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496405#comment-13496405 ]
Hudson commented on HBASE-7128:
-------------------------------
Integrated in HBase-TRUNK #3535 (See [https://builds.apache.org/job/HBase-TRUNK/3535/])
HBASE-7128 Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8 (Hiroshi) (Revision 1408758)
Result = FAILURE
tedyu :
Files :
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/RegexStringComparator.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/GroupingTableMap.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/GroupingTableMapper.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogUtil.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestPrefixFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapred/TestTableMapReduce.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultithreadedTableMapper.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableMapReduce.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduce annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498515#comment-13498515 ]
Hudson commented on HBASE-7128:
-------------------------------
Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #263 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/263/])
HBASE-7128 Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8, addendum (Revision 1409881)
Result = SUCCESS
tedyu :
Files :
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
> Reduce annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Assignee: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: 7128-addendum.txt, HBASE-7128.patch, HBASE-7128-V2.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-7128) Reduced annoying catch clauses of
UnsupportedEncodingException that is never thrown because of UTF-8
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-7128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493338#comment-13493338 ]
Hadoop QA commented on HBASE-7128:
----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12552649/HBASE-7128.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 21 new or modified tests.
{color:green}+1 hadoop2.0{color}. The patch compiles against the hadoop 2.0 profile.
{color:red}-1 javadoc{color}. The javadoc tool appears to have generated 87 warning messages.
{color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings.
{color:red}-1 findbugs{color}. The patch appears to introduce 15 new Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings.
{color:red}-1 core tests{color}. The patch failed these unit tests:
org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat
Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3265//console
This message is automatically generated.
> Reduced annoying catch clauses of UnsupportedEncodingException that is never thrown because of UTF-8
> ----------------------------------------------------------------------------------------------------
>
> Key: HBASE-7128
> URL: https://issues.apache.org/jira/browse/HBASE-7128
> Project: HBase
> Issue Type: Improvement
> Reporter: Hiroshi Ikeda
> Priority: Trivial
> Fix For: 0.96.0
>
> Attachments: HBASE-7128.patch
>
>
> There are some codes that catch UnsupportedEncodingException, and log or ignore it because Java always supports UTF-8 (see the javadoc of Charset).
> The catch clauses are annoying, and they should be replaced by methods of Bytes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira