diff options
author | uncleGen <hustyugm@gmail.com> | 2017-02-27 18:02:45 -0800 |
---|---|---|
committer | Shixiong Zhu <shixiong@databricks.com> | 2017-02-27 18:02:45 -0800 |
commit | 73530383538ad72fdc3dd4c670485192f12ebc4e (patch) | |
tree | 4c6f57937b9c6ab8a1bea11650baad094f7472a8 /sql/core/src/main | |
parent | 16d8472f74313b0d1932b69a9807fe0f2ad7057c (diff) | |
download | spark-73530383538ad72fdc3dd4c670485192f12ebc4e.tar.gz spark-73530383538ad72fdc3dd4c670485192f12ebc4e.tar.bz2 spark-73530383538ad72fdc3dd4c670485192f12ebc4e.zip |
[SPARK-19749][SS] Name socket source with a meaningful name
## What changes were proposed in this pull request?
Name socket source with a meaningful name
## How was this patch tested?
Jenkins
Author: uncleGen <hustyugm@gmail.com>
Closes #17082 from uncleGen/SPARK-19749.
Diffstat (limited to 'sql/core/src/main')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/socket.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/socket.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/socket.scala index 900d92bc0d..58bff27a05 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/socket.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/socket.scala @@ -46,8 +46,8 @@ object TextSocketSource { * support for fault recovery and keeping all of the text read in memory forever. */ class TextSocketSource(host: String, port: Int, includeTimestamp: Boolean, sqlContext: SQLContext) - extends Source with Logging -{ + extends Source with Logging { + @GuardedBy("this") private var socket: Socket = null @@ -168,6 +168,8 @@ class TextSocketSource(host: String, port: Int, includeTimestamp: Boolean, sqlCo socket = null } } + + override def toString: String = s"TextSocketSource[host: $host, port: $port]" } class TextSocketSourceProvider extends StreamSourceProvider with DataSourceRegister with Logging { |