hadoop - What it happened when i use FileSystem.get(URI.create("hdfs://loacalhost:9000/filepath"), conf)? -
i confused in project require me optimization small file support hdfs. step this:
- store small file hbase;
- several small file merger big file , store hdfs;
- use tactics record small file's position;
- we need guarantee file's uri consistent.
and in study meet problem. example, if use command
hdfs fs -put ~/local/smallfile /usr/smallfile
.
if don't anything, in code
filesystem.get(uri.create("hdfs://loacalhost:9000/usr/smallfile"), conf)
.
but if project ok, small file should store hbase, when use uri hdfs://loacalhost:9000/usr/smallfile
in code, , should return null
.
the problem is, how redirect hbase , return back. read rpc , still can't help.
my idea add server between user , hdfs, uri request , stop in it. don't know how. , feasible on technique?
trying read hbase file directly hdfs not idea naming not predictable. also, performance bad.
if file max size few mb's can store in hbase , use hbase api fetch data.
store 1 file in 1 cell , able retrieve via hbase api. can use hbase stargate fetch files via http rest call.
Comments
Post a Comment