This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package testpackage | |
import org.apache.spark.sql.Row | |
import org.apache.spark.sql.types.{StringType, StructField, StructType} | |
import org.apache.spark.{SparkConf, SparkContext } | |
import org.apache.spark.sql.hive.HiveContext | |
object TestJob { | |
def main(args: Array[String]): Unit ={ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
For more examples, please refer to https://github.com/cloudera-labs/SparkOnHBase/tree/cdh5-0.0.2/java/com/cloudera/spark/hbase/example | |
*/ | |
package testpackage | |
import com.cloudera.spark.hbase.HBaseContext | |
import com.typesafe.config.Config | |
import org.apache.hadoop.conf.Configuration | |
import org.apache.hadoop.hbase.{CellUtil, HBaseConfiguration} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CHECK ishassan/build.sbt as well | |
import org.apache.hadoop.hbase.client._ | |
import org.apache.hadoop.hbase.util.Bytes | |
import org.apache.hadoop.hbase.{CellUtil, HBaseConfiguration, TableName} | |
import org.apache.hadoop.conf.Configuration | |
import scala.collection.JavaConverters._ | |
object ScalaHBaseExample extends App{ | |
def printRow(result : Result) = { |