File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
examples/src/main/scala/org/apache/spark/examples Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1818package org .apache .spark .examples
1919
2020import org .apache .hadoop .hbase .client .HBaseAdmin
21- import org .apache .hadoop .hbase .{HBaseConfiguration , HTableDescriptor }
21+ import org .apache .hadoop .hbase .{HBaseConfiguration , HTableDescriptor , TableName }
2222import org .apache .hadoop .hbase .mapreduce .TableInputFormat
2323
2424import 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
You can’t perform that action at this time.
0 commit comments