|
41 | 41 | "cell_type": "markdown", |
42 | 42 | "metadata": {}, |
43 | 43 | "source": [ |
44 | | - "Optionally, the contents of the cell can produce a Spark session to fill out default values for the GUI. Only one spark magic can be active at a time." |
| 44 | + "Optionally, the contents of the cell can produce a Spark session to fill out default values for the GUI. Only one spark magic can be connected at a time." |
45 | 45 | ] |
46 | 46 | }, |
47 | 47 | { |
|
73 | 73 | "SparkSession.builder().master(\"local[100]\")" |
74 | 74 | ] |
75 | 75 | }, |
| 76 | + { |
| 77 | + "cell_type": "markdown", |
| 78 | + "metadata": {}, |
| 79 | + "source": [ |
| 80 | + "If you have added JARs to the classpath of the Spark driver with the `%classpath` magic, they can be copied to the executors as follows. We are looking into making this automatic, and also supporting `spark.jars.packages`, see [#7498](https://github.com/twosigma/beakerx/issues/7498)." |
| 81 | + ] |
| 82 | + }, |
| 83 | + { |
| 84 | + "cell_type": "code", |
| 85 | + "execution_count": null, |
| 86 | + "metadata": {}, |
| 87 | + "outputs": [], |
| 88 | + "source": [ |
| 89 | + "%%spark\n", |
| 90 | + "val jars = ClasspathManager.getJars().toArray.mkString(\",\")\n", |
| 91 | + "SparkSession.builder().config(\"spark.jars\", jars)" |
| 92 | + ] |
| 93 | + }, |
| 94 | + { |
| 95 | + "cell_type": "markdown", |
| 96 | + "metadata": {}, |
| 97 | + "source": [ |
| 98 | + "After starting a session with a Spark cluster using one of the above configurations,\n", |
| 99 | + "then code like the following runs in parallel without any additional annotation.\n", |
| 100 | + "A three-way progress widget automatically appears, showing how many tasks are waiting, running, and completed." |
| 101 | + ] |
| 102 | + }, |
76 | 103 | { |
77 | 104 | "cell_type": "code", |
78 | 105 | "execution_count": null, |
|
94 | 121 | "cell_type": "markdown", |
95 | 122 | "metadata": {}, |
96 | 123 | "source": [ |
97 | | - "By default the first 1000 rows are materialized to preview a dataset." |
| 124 | + "By default the Dataset preview shows just the columns and their types. You can click a button to materialize ten rows." |
98 | 125 | ] |
99 | 126 | }, |
100 | 127 | { |
|
122 | 149 | "metadata": {}, |
123 | 150 | "outputs": [], |
124 | 151 | "source": [ |
125 | | - "ds.display(1)" |
| 152 | + "ds.display(1000)" |
126 | 153 | ] |
127 | 154 | } |
128 | 155 | ], |
|
139 | 166 | "name": "Scala", |
140 | 167 | "nbconverter_exporter": "", |
141 | 168 | "version": "2.11.12" |
| 169 | + }, |
| 170 | + "toc": { |
| 171 | + "base_numbering": 1, |
| 172 | + "nav_menu": {}, |
| 173 | + "number_sections": false, |
| 174 | + "sideBar": false, |
| 175 | + "skip_h1_title": false, |
| 176 | + "title_cell": "Table of Contents", |
| 177 | + "title_sidebar": "Contents", |
| 178 | + "toc_cell": false, |
| 179 | + "toc_position": {}, |
| 180 | + "toc_section_display": false, |
| 181 | + "toc_window_display": false |
142 | 182 | } |
143 | 183 | }, |
144 | 184 | "nbformat": 4, |
|
0 commit comments