You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/06/07 14:52:54 UTC

[GitHub] [hbase] bsglz commented on a change in pull request #1822: HBASE-24483 Add repeated prefix logging for MultipleColumnPrefixFilter

bsglz commented on a change in pull request #1822:
URL: https://github.com/apache/hbase/pull/1822#discussion_r436371430



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultipleColumnPrefixFilter.java
##########
@@ -40,15 +42,18 @@
  */
 @InterfaceAudience.Public
 public class MultipleColumnPrefixFilter extends FilterBase {
+  private static final Logger LOG = LoggerFactory.getLogger(MultipleColumnPrefixFilter.class);
   protected byte [] hint = null;
   protected TreeSet<byte []> sortedPrefixes = createTreeSet();
   private final static int MAX_LOG_PREFIXES = 5;
 
   public MultipleColumnPrefixFilter(final byte [][] prefixes) {
     if (prefixes != null) {
       for (int i = 0; i < prefixes.length; i++) {
-        if (!sortedPrefixes.add(prefixes[i]))
-          throw new IllegalArgumentException ("prefixes must be distinct");
+        if (!sortedPrefixes.add(prefixes[i])) {
+          LOG.error("prefix {} is repeated", Bytes.toString(prefixes[i]));
+          throw new IllegalArgumentException("prefixes must be distinct");

Review comment:
       Fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org