0
snakebiteを使用してhdfsディレクトリにファイルが存在するかどうかを確認し、存在しない場合は作成します。私はtouchz
hereのドキュメントを、次のと、このようにそれを使用しています:Snakebite HDFS touchzが動作しない
def createFile(client):
if client.test("/user/test/sample.txt", exists=True):
print "file exists"
else:
print "file not exist, create file"
print client.touchz(["/user/test/sample.txt"])
client = Client(remote_host, 8020, use_trash=False)
createFile(client)
をしかし、私は確認するために行くとき、私はremote_host:/user/test/
でSAMPLE.TXTを参照してくださいいけないしかし、私はhadoop fs -touchz remote_host:/user/test/sample.txt
snakebiteのtouchz
の使い方は?