From d2b1c10b45c9b94e64c8b8ad8706424d1b322a47 Mon Sep 17 00:00:00 2001 From: Bhupendra Date: Mon, 7 Sep 2015 15:25:54 +0530 Subject: [PATCH] HBASE-14365: Error scanning labels table in logs with exception while running bulkload, even visibility feature is disabled --- .../hbase/mapreduce/DefaultVisibilityExpressionResolver.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/DefaultVisibilityExpressionResolver.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/DefaultVisibilityExpressionResolver.java index cbfb6f2..14796e0 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/DefaultVisibilityExpressionResolver.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/DefaultVisibilityExpressionResolver.java @@ -76,10 +76,6 @@ public class DefaultVisibilityExpressionResolver implements VisibilityExpression connection = ConnectionFactory.createConnection(conf); try { labelsTable = connection.getTable(LABELS_TABLE_NAME); - } catch (TableNotFoundException e) { - // Just return with out doing any thing. When the VC is not used we wont be having 'labels' - // table in the cluster. - return; } catch (IOException e) { LOG.error("Error opening 'labels' table", e); return; @@ -96,6 +92,11 @@ public class DefaultVisibilityExpressionResolver implements VisibilityExpression byte[] value = next.getValue(LABELS_TABLE_FAMILY, LABEL_QUALIFIER); labels.put(Bytes.toString(value), Bytes.toInt(row)); } + } catch (TableNotFoundException e) { + // Just return with out doing any thing. When the VC is not used we wont be having 'labels' + // table in the cluster. + LOG.warn("'labels' table is not found. Visibility Labels feature is not used."); + return; } catch (IOException e) { LOG.error("Error scanning 'labels' table", e); } finally { -- 1.8.4.msysgit.0