Skip to content

Commit

Permalink
[SPARK-31748][PYTHON][3.0] Document resource module in PySpark doc an…
Browse files Browse the repository at this point in the history
…d rename/move classes
  • Loading branch information
HyukjinKwon committed May 20, 2020
1 parent 70ff959 commit 4615ed1
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions python/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Contents:
pyspark.streaming
pyspark.ml
pyspark.mllib
pyspark.resource


Core classes:
Expand Down
11 changes: 11 additions & 0 deletions python/docs/pyspark.resource.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pyspark.resource module
=======================

Module Contents
---------------

.. automodule:: pyspark.resource
:members:
:undoc-members:
:inherited-members:

1 change: 1 addition & 0 deletions python/docs/pyspark.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Subpackages
pyspark.streaming
pyspark.ml
pyspark.mllib
pyspark.resource

Contents
--------
Expand Down
4 changes: 2 additions & 2 deletions python/docs/pyspark.sql.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pyspark.sql module
==================

Module Context
--------------
Module Contents
---------------

.. automodule:: pyspark.sql
:members:
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
from pyspark.storagelevel import StorageLevel
from pyspark.accumulators import Accumulator, AccumulatorParam
from pyspark.broadcast import Broadcast
from pyspark.resourceinformation import ResourceInformation
from pyspark.resource import ResourceInformation
from pyspark.serializers import MarshalSerializer, PickleSerializer
from pyspark.status import *
from pyspark.taskcontext import TaskContext, BarrierTaskContext, BarrierTaskInfo
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from pyspark.serializers import PickleSerializer, BatchedSerializer, UTF8Deserializer, \
PairDeserializer, AutoBatchedSerializer, NoOpSerializer, ChunkedStream
from pyspark.storagelevel import StorageLevel
from pyspark.resourceinformation import ResourceInformation
from pyspark.resource import ResourceInformation
from pyspark.rdd import RDD, _load_from_socket, ignore_unicode_prefix
from pyspark.traceback_utils import CallSite, first_spark_call
from pyspark.status import StatusTracker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ class ResourceInformation(object):
One example is GPUs, where the addresses would be the indices of the GPUs
@param name the name of the resource
@param addresses an array of strings describing the addresses of the resource
:param name: the name of the resource
:param addresses: an array of strings describing the addresses of the resource
.. versionadded:: 3.0.0
"""

def __init__(self, name, addresses):
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from pyspark.java_gateway import local_connect_and_auth
from pyspark.taskcontext import BarrierTaskContext, TaskContext
from pyspark.files import SparkFiles
from pyspark.resourceinformation import ResourceInformation
from pyspark.resource import ResourceInformation
from pyspark.rdd import PythonEvalType
from pyspark.serializers import write_with_length, write_int, read_long, read_bool, \
write_long, read_int, SpecialLengths, UTF8Deserializer, PickleSerializer, \
Expand Down

0 comments on commit 4615ed1

Please sign in to comment.