我在使用magellan-1.0.4-s_2.11spark笔记本电脑时遇到了麻烦.我从网上下载JAR https://spark-packages.org/package/harsha2010/magellan并试图放置SPARK_HOME/bin/spark-shell --packages harsha2010:magellan:1.0.4-s_2.11在Start of Customized Settingsbin文件夹的火花笔记本文件的部分.
这是我的进口
import magellan.{Point, Polygon, PolyLine}
import magellan.coord.NAD83
import org.apache.spark.sql.magellan.MagellanContext
import org.apache.spark.sql.magellan.dsl.expressions._
import org.apache.spark.sql.Row
import org.apache.spark.sql.types._
Run Code Online (Sandbox Code Playgroud)
而我的错误......
<console>:71: error: object Point is not a member of package org.apache.spark.sql.magellan
import magellan.{Point, Polygon, PolyLine}
^
<console>:72: error: object coord is not a member of package org.apache.spark.sql.magellan
import magellan.coord.NAD83
^
<console>:73: error: object MagellanContext is not a member of package org.apache.spark.sql.magellan
import org.apache.spark.sql.magellan.MagellanContext
Run Code Online (Sandbox Code Playgroud)
然后,我尝试通过将其放入类似的任何其他库来导入新库main script:
$lib_dir/magellan-1.0.4-s_2.11.jar"
Run Code Online (Sandbox Code Playgroud)
这不起作用,我一直在挠头,想知道我做错了什么.如何将magellan等库导入spark笔记本?
我一直在按照本教程为scala安装spark:https: //www.tutorialspoint.com/apache_spark/apache_spark_installation.htm
但是,当我尝试运行时,spark-shell我在控制台中收到此错误.
/usr/local/spark/bin/spark-shell: line 57: /usr/local/spark/bin/bin/spark-submit: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我的bashrc看起来像这样:
export PATH = $PATH:/usr/local/spark/bin
export SCALA_HOME=/usr/local/scala/bin
export PYTHONPATH=$SPARK_HOME/python
Run Code Online (Sandbox Code Playgroud)
我错了什么?我以前为python安装了spark,但现在我正在尝试使用scala.火花会让变量混乱吗?谢谢.
我一直在使用来自https://github.com/lelandrichardson/react-native-maps/blob/master/docs/installation.md的React-Native-Maps库.
我已经完成了所有的滴注步骤,但我仍然收到一个空白屏幕(整个反应屏幕都是白色的,就像没有渲染一样).
但是,当我尝试在反应中渲染元素时,会弹出文本.因此我的地图没有显示是我执行库而不是反应问题的结果.
这是我的index.android.js页面的代码
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import MapView from 'react-native-maps';
class roads extends Component {
render() {
return (
<View style={styles.container}>
<MapView
style={styles.map}
initialRegion={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
}, …Run Code Online (Sandbox Code Playgroud) apache-spark ×3
scala ×2
android ×1
google-maps ×1
javascript ×1
linux ×1
magellan ×1
pyspark ×1
react-native ×1