Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i post text file to HDFS #44

Open
baisui1981 opened this issue Jul 8, 2021 · 0 comments
Open

how can i post text file to HDFS #44

baisui1981 opened this issue Jul 8, 2021 · 0 comments

Comments

@baisui1981
Copy link

baisui1981 commented Jul 8, 2021

when i was post text to HDFS by java client from local:

try (TISFSDataOutputStream outputStream = fileSystem.create(p, true)) {
            org.apache.commons.io.IOUtils.write(IOUtils.loadResourceFromClasspath(DataXHdfsWriter.class
                    , "hdfs-datax-writer-assert-without-option-val.json"), outputStream, TisUTF8.get());
        }

however throw an exception form server side:

org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/mozhenghua/com.qlangtech.tis.hdfs.impl.HdfsFileSystemFactory@29d80d2b/test/test could only be replicated to 0 nodes instead of minReplication (=1).  There are 1 datanode(s) running and 1 node(s) are excluded in this operation.
	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(BlockManager.java:1628)

have export an port 8082, on namenode :

    ports:
      - "50070:50070"
      - "8020:8020"

and I have found a historical issue #15, it seems that has been fixed. is there anyone can help me, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant