Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop, mail # user - Re: Accessing HDFS


Copy link to this message
-
Re: Accessing HDFS
Harsh J 2013-07-06, 02:01
These APIs (ClientProtocol, DFSClient) are not for Public access.
Please do not use them in production. The only API we care not to
change incompatibly are the FileContext and the FileSystem APIs. They
provide much of what you want - if not, log a JIRA.

On Fri, Jul 5, 2013 at 11:40 PM, John Lilley <[EMAIL PROTECTED]> wrote:
> I’ve seen mentioned that you can access HDFS via ClientProtocol, as in:
>
> ClientProtocol namenode = DFSClient.createNamenode(conf);
> LocatedBlocks lbs = namenode.getBlockLocations(path, start, length);
>
>
>
> But we use:
>
> fs = FileSystem.get(URI, conf);
>
> filestatus = fs.getFileStatus(path);
>
> fs.getFileBlockLocations(filestatus, start, length);
>
>
>
> As a YARN application and/or DFS client, are there times when I should use
> the ClientProtocol directly?
>
>
>
> Thanks
>
> John
>
>

--
Harsh J
+
John Lilley 2013-07-15, 21:27