mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Recovering a member name that is not associated with a namespace
This commit is contained in:
parent
31af92ab57
commit
14695cb885
2 changed files with 13 additions and 13 deletions
|
|
@ -33,7 +33,7 @@ except ImportError:
|
|||
|
||||
# for back compatibility
|
||||
|
||||
class __ZeppelinLogger__(object):
|
||||
class Logger(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ class __ZeppelinLogger__(object):
|
|||
pass
|
||||
|
||||
|
||||
class __PyZeppelinContext__(object):
|
||||
class PyZeppelinContext(object):
|
||||
""" A context impl that uses Py4j to communicate to JVM
|
||||
"""
|
||||
|
||||
|
|
@ -205,14 +205,14 @@ intp = gateway.entry_point
|
|||
intp.onPythonScriptInitialized(os.getpid())
|
||||
|
||||
java_import(gateway.jvm, "org.apache.zeppelin.display.Input")
|
||||
z = __zeppelin__ = __PyZeppelinContext__(intp)
|
||||
z = __zeppelin__ = PyZeppelinContext(intp)
|
||||
__zeppelin__._setup_matplotlib()
|
||||
|
||||
_zcUserQueryNameSpace["__zeppelin__"] = __zeppelin__
|
||||
_zcUserQueryNameSpace["z"] = z
|
||||
|
||||
__zcStdOutput__ = __ZeppelinLogger__()
|
||||
sys.stdout = __zcStdOutput__
|
||||
output = Logger()
|
||||
sys.stdout = output
|
||||
#sys.stderr = output
|
||||
|
||||
while True :
|
||||
|
|
@ -294,4 +294,4 @@ while True :
|
|||
except:
|
||||
intp.setStatementsFinished(traceback.format_exc(), True)
|
||||
|
||||
__zcStdOutput__.reset()
|
||||
output.reset()
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import warnings
|
|||
# for back compatibility
|
||||
from pyspark.sql import SQLContext, HiveContext, Row
|
||||
|
||||
class __ZeppelinLogger__(object):
|
||||
class Logger(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ class __ZeppelinLogger__(object):
|
|||
pass
|
||||
|
||||
|
||||
class __PyZeppelinContext__(dict):
|
||||
class PyZeppelinContext(dict):
|
||||
def __init__(self, zc):
|
||||
self.z = zc
|
||||
self._displayhook = lambda *args: None
|
||||
|
|
@ -230,9 +230,9 @@ class PySparkCompletion:
|
|||
self.interpreterObject.setStatementsFinished(result, False)
|
||||
|
||||
|
||||
__zcStdOutput__ = __ZeppelinLogger__()
|
||||
sys.stdout = __zcStdOutput__
|
||||
sys.stderr = __zcStdOutput__
|
||||
output = Logger()
|
||||
sys.stdout = output
|
||||
sys.stderr = output
|
||||
|
||||
client = GatewayClient(port=int(sys.argv[1]))
|
||||
sparkVersion = SparkVersion(int(sys.argv[2]))
|
||||
|
|
@ -295,7 +295,7 @@ sqlContext = __zSqlc__
|
|||
_zcUserQueryNameSpace["sqlContext"] = sqlContext
|
||||
|
||||
completion = PySparkCompletion(intp)
|
||||
z = __zeppelin__ = __PyZeppelinContext__(intp.getZeppelinContext())
|
||||
z = __zeppelin__ = PyZeppelinContext(intp.getZeppelinContext())
|
||||
__zeppelin__._setup_matplotlib()
|
||||
_zcUserQueryNameSpace["z"] = z
|
||||
_zcUserQueryNameSpace["__zeppelin__"] = __zeppelin__
|
||||
|
|
@ -373,4 +373,4 @@ while True :
|
|||
except:
|
||||
intp.setStatementsFinished(traceback.format_exc(), True)
|
||||
|
||||
__zcStdOutput__.reset()
|
||||
output.reset()
|
||||
|
|
|
|||
Loading…
Reference in a new issue