You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Sean Busbey (JIRA)" <ji...@apache.org> on 2014/08/05 01:01:13 UTC
[jira] [Reopened] (HBASE-11068) Update code to use Admin factory
method instead of constructor
[ https://issues.apache.org/jira/browse/HBASE-11068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Busbey reopened HBASE-11068:
---------------------------------
Missed a use of HBaseAdmin, which is breaking compilation:
{code}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityWithCheckAuths.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilit
index c4f667b..dfb5c84 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityWithCheckAuths.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/visibility/TestVisibilityWithCheckAuths.java
@@ -30,8 +30,8 @@ import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.MediumTests;
import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.client.Admin;
import org.apache.hadoop.hbase.client.Append;
-import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse;
@@ -119,7 +119,7 @@ public class TestVisibilityWithCheckAuths {
};
SUPERUSER.runAs(action);
TableName tableName = TableName.valueOf(TEST_NAME.getMethodName());
- HBaseAdmin hBaseAdmin = TEST_UTIL.getHBaseAdmin();
+ Admin hBaseAdmin = TEST_UTIL.getHBaseAdmin();
HColumnDescriptor colDesc = new HColumnDescriptor(fam);
colDesc.setMaxVersions(5);
HTableDescriptor desc = new HTableDescriptor(tableName);
{code}
[~stack] soon enough for a quick fixup commit, or should I open an issue?
> Update code to use Admin factory method instead of constructor
> --------------------------------------------------------------
>
> Key: HBASE-11068
> URL: https://issues.apache.org/jira/browse/HBASE-11068
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 0.99.0
> Reporter: Carter
> Assignee: Carter
> Fix For: 0.99.0, 2.0.0
>
> Attachments: HBASE_11068-branch-1-v2.patch, HBASE_11068.patch
>
>
> Where feasible, the code should be updated to use the HConnection factory method for the admin interface. For instance, the following:
> {code:java}
> HBaseAdmin admin = new HBaseAdmin(conf);
> {code}
> would be changed to:
> {code:java}
> Admin admin = HConnectionManager.createConnection(conf).getAdmin();
> {code}
> This would also require updates to admin calls that refer to a tablename as byte[] or String.
> {code:java}
> admin.enableTable("mytable");
> {code}
> would change to:
> {code:java}
> admin.enableTable(TableName.valueOf("mytable"));
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)