Configuration config = HBaseConfiguration.create();
Admin admin = new Admin(conf);
-String table = "myTable";
+TableName table = TableName.valueOf("myTable");
admin.disableTable(table);
@@ -17403,7 +17403,7 @@ the data, and deletes the table.
import java.lang
-from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, HConstants
+from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, HConstants, TableName
from org.apache.hadoop.hbase.client import HBaseAdmin, HTable, Get
from org.apache.hadoop.hbase.io import Cell, RowResult
@@ -17415,7 +17415,7 @@ conf = HBaseConfiguration()
# Create a table named 'test' that has two column families,
# one named 'content, and the other 'anchor'. The colons
# are required for column family names.
-tablename = "test"
+tablename = TableName.valueOf("test")
desc = HTableDescriptor(tablename)
desc.addFamily(HColumnDescriptor("content:"))
@@ -19030,7 +19030,7 @@ admin.enableTable(tableName);
onwards.
-
String tableName = "users";
+TableName tableName = TableName.valueOf("users");
String path = "hdfs://<namenode>:<port>/user/<hadoop-user>/coprocessor.jar";
Configuration conf = HBaseConfiguration.create();
HBaseAdmin admin = new HBaseAdmin(conf);
@@ -25762,7 +25762,7 @@ hbase shell> drop 'tableName'
-
void rename(Admin admin, String oldTableName, String newTableName) {
+void rename(Admin admin, String oldTableName, TableName newTableName) {
String snapshotName = randomName();
admin.disableTable(oldTableName);
admin.snapshot(snapshotName, oldTableName);
@@ -32882,7 +32882,7 @@ The server will return cellblocks compressed using this same compressor as long