org.apache.spark.sql.hive.api.java

JavaHiveContext

class JavaHiveContext extends JavaSQLContext

The entry point for executing Spark SQL queries from a Java program.

Linear Supertypes
JavaSQLContext, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By inheritance
Inherited
  1. JavaHiveContext
  2. JavaSQLContext
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JavaHiveContext(sparkContext: JavaSparkContext)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def applySchema(rdd: JavaRDD[_], beanClass: Class[_]): JavaSchemaRDD

    Applies a schema to an RDD of Java Beans.

    Applies a schema to an RDD of Java Beans.

    Definition Classes
    JavaSQLContext
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def createParquetFile(beanClass: Class[_], path: String, allowExisting: Boolean = true, conf: Configuration = new Configuration()): JavaSchemaRDD

    :: Experimental :: Creates an empty parquet file with the schema of class beanClass, which can be registered as a table.

    :: Experimental :: Creates an empty parquet file with the schema of class beanClass, which can be registered as a table. This registered table can be used as the target of future insertInto operations.

    JavaSQLContext sqlCtx = new JavaSQLContext(...)
    
    sqlCtx.createParquetFile(Person.class, "path/to/file.parquet").registerAsTable("people")
    sqlCtx.sql("INSERT INTO people SELECT 'michael', 29")
    beanClass

    A java bean class object that will be used to determine the schema of the parquet file.

    path

    The path where the directory containing parquet metadata should be created. Data inserted into this table will also be stored at this location.

    allowExisting

    When false, an exception will be thrown if this directory already exists.

    conf

    A Hadoop configuration object that can be used to specific options to the parquet output format.

    Definition Classes
    JavaSQLContext
    Annotations
    @Experimental()
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def getSchema(beanClass: Class[_]): Seq[AttributeReference]

    Returns a Catalyst Schema for the given java bean class.

    Returns a Catalyst Schema for the given java bean class.

    Attributes
    protected
    Definition Classes
    JavaSQLContext
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def hql(hqlQuery: String): JavaSchemaRDD

    Executes a query expressed in HiveQL, returning the result as a JavaSchemaRDD.

  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def jsonFile(path: String): JavaSchemaRDD

    Loads a JSON file (one object per line), returning the result as a JavaSchemaRDD.

    Loads a JSON file (one object per line), returning the result as a JavaSchemaRDD. It goes through the entire dataset once to determine the schema.

    Definition Classes
    JavaSQLContext
  19. def jsonRDD(json: JavaRDD[String]): JavaSchemaRDD

    Loads an RDD[String] storing JSON objects (one object per record), returning the result as a JavaSchemaRDD.

    Loads an RDD[String] storing JSON objects (one object per record), returning the result as a JavaSchemaRDD. It goes through the entire dataset once to determine the schema.

    Definition Classes
    JavaSQLContext
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def parquetFile(path: String): JavaSchemaRDD

    Loads a parquet file, returning the result as a JavaSchemaRDD.

    Loads a parquet file, returning the result as a JavaSchemaRDD.

    Definition Classes
    JavaSQLContext
  24. def registerRDDAsTable(rdd: JavaSchemaRDD, tableName: String): Unit

    Registers the given RDD as a temporary table in the catalog.

    Registers the given RDD as a temporary table in the catalog. Temporary tables exist only during the lifetime of this instance of SQLContext.

    Definition Classes
    JavaSQLContext
  25. def sql(sqlQuery: String): JavaSchemaRDD

    Executes a query expressed in SQL, returning the result as a JavaSchemaRDD

    Executes a query expressed in SQL, returning the result as a JavaSchemaRDD

    Definition Classes
    JavaSQLContext
  26. val sqlContext: HiveContext

    Definition Classes
    JavaHiveContextJavaSQLContext
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from JavaSQLContext

Inherited from AnyRef

Inherited from Any

userf

Ungrouped