Skip to content

Commit ceb31c5

Browse files
committed
the modification for adapting updation of hbase
1 parent 3253b61 commit ceb31c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/src/main/scala/org/apache/spark/examples/HBaseTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.apache.spark.examples
1919

2020
import org.apache.hadoop.hbase.client.HBaseAdmin
21-
import org.apache.hadoop.hbase.{HBaseConfiguration, HTableDescriptor}
21+
import org.apache.hadoop.hbase.{HBaseConfiguration, HTableDescriptor, TableName}
2222
import org.apache.hadoop.hbase.mapreduce.TableInputFormat
2323

2424
import org.apache.spark._
@@ -36,7 +36,7 @@ object HBaseTest {
3636
// Initialize hBase table if necessary
3737
val admin = new HBaseAdmin(conf)
3838
if (!admin.isTableAvailable(args(0))) {
39-
val tableDesc = new HTableDescriptor(args(0))
39+
val tableDesc = new HTableDescriptor(TableName.valueOf(args(0)))
4040
admin.createTable(tableDesc)
4141
}
4242

0 commit comments

Comments
 (0)