コード例 #1
0
ファイル: pseudo_hdfs4.py プロジェクト: neiodavince/hue
def main():
  logging.basicConfig(level=logging.DEBUG)

  cluster = PseudoHdfs4()
  cluster.start()

  print "%s running" % (cluster,)
  print "fs.default.name=%s" % (cluster.fs_default_name,)
  print "dfs.http.address=%s" % (cluster.dfs_http_address,)
  print "jobtracker.thrift.port=%s" % (cluster.jt_thrift_port,)
  print "mapred.job.tracker=%s" % (cluster.mapred_job_tracker,)

  from IPython.Shell import IPShellEmbed
  IPShellEmbed()()

  cluster.stop()
コード例 #2
0
ファイル: pseudo_hdfs4.py プロジェクト: tempbottle/hue
def main():
    logging.basicConfig(level=logging.DEBUG)

    cluster = PseudoHdfs4()
    cluster.start()

    print "%s running" % (cluster, )
    print "fs.default.name=%s" % (cluster.fs_default_name, )
    print "dfs.http.address=%s" % (cluster.dfs_http_address, )
    print "jobtracker.thrift.port=%s" % (cluster.jt_thrift_port, )
    print "mapred.job.tracker=%s" % (cluster.mapred_job_tracker, )

    from IPython.Shell import IPShellEmbed
    IPShellEmbed()()

    cluster.stop()
コード例 #3
0
ファイル: mini_cluster.py プロジェクト: ycaihua/hue
  """
  Manages _shared_cluster.
  """
  global _shared_cluster
  if _shared_cluster is None:
    _shared_cluster = MiniHadoopCluster()
    _shared_cluster.start()
    atexit.register(_shared_cluster.stop)
  return _shared_cluster

if __name__ == '__main__':
  """
  It's poor form to write tests for tests (the world-wide stack
  overflow exception), so this merely tries the code.
  """
  logging.basicConfig(level=logging.DEBUG)
  import desktop
  desktop.lib.conf.initialize([hadoop.conf])

  if True:
    cluster = MiniHadoopCluster(num_datanodes=5, num_tasktrackers=5)
    cluster.start()
    print cluster.namenode_port
    print cluster.jobtracker_port
    print cluster.config.get("dfs.thrift.address")
    cluster.dump_ini(sys.stdout)

    from IPython.Shell import IPShellEmbed
    IPShellEmbed()()
    cluster.stop()
コード例 #4
0
 def s():
   for f in finish:
     f()
   cluster.stop()
コード例 #5
0
ファイル: test_base.py プロジェクト: voyageth/hue
 def s():
   for f in finish:
     f()
   cluster.stop()