hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lewuathe <>
Subject [GitHub] incubator-hivemall pull request #41: [HIVEMALL-54][SPARK] Add an easy-to-use...
Date Thu, 09 Feb 2017 13:20:39 GMT
Github user Lewuathe commented on a diff in the pull request:
    --- Diff: docs/gitbook/spark/getting_started/ ---
    @@ -0,0 +1,49 @@
    +  Licensed to the Apache Software Foundation (ASF) under one
    +  or more contributor license agreements.  See the NOTICE file
    +  distributed with this work for additional information
    +  regarding copyright ownership.  The ASF licenses this file
    +  to you under the Apache License, Version 2.0 (the
    +  "License"); you may not use this file except in compliance
    +  with the License.  You may obtain a copy of the License at
    +  Unless required by applicable law or agreed to in writing,
    +  software distributed under the License is distributed on an
    +  KIND, either express or implied.  See the License for the
    +  specific language governing permissions and limitations
    +  under the License.
    +* Spark v2.0 or later
    +* Java 7 or later
    +* hivemall-spark-xxx-with-dependencies.jar
    +* [define-all.spark](
    +* [import-packages.spark](
    +First, you download a compiled Spark package from [the Spark official web page](
    +invoke spark-shell with a compiled Hivemall binary.
    +$ ./bin/spark-shell --jars hivemall-spark-xxx-with-dependencies.jar
    +> #### Notice
    +> If you would like to try Hivemall functions on the latest release of Spark, you
just say `bin/spark-shell` in a Hivemall package.
    +> This command automatically downloads the latest Spark version, compiles Hivemall
for the version, and invokes spark-shell with the compiled Hivemall binary.
    +Then, you load scripts for Hivemall functions.
    +scala> :load define-all.spark
    --- End diff --
    I found current `define-all.spark` assumes `sqlContext` is imported in advance. But the
latest spark-shell imports `sqlContext` under Spark session. So it is necessary to rewrite
`define-all.spark` or documentation.
    scala> :load resources/ddl/define-all.spark
    Loading resources/ddl/define-all.spark...
    <console>:28: error: not found: value sqlContext
           sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS hivemall_version")
    I think adding below in doc is sufficient.
    scala> val sqlContext = spark.sqlContext

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message