hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hadoop.support@visolve.com" <hadoop.supp...@visolve.com>
Subject Re: Is there a way to view the files in HDFS directly?
Date Fri, 07 Nov 2014 09:50:50 GMT
Hello,

In normal you can view the file by issuing the command

#hadoop dfs -cat <path-to-file>

Default file store location in /user/<name>/<file-name>

Regards,
ViSolve

On 11/07/2014 05:43 AM, David Novogrodsky wrote:
> Hello,
>
> Is there a way to view files in the Hadoop HDFS?  I have a directory 
> of files like this:
> [cloudera@quickstart ~]$ hdfs dfs -ls  /user/hive/warehouse/categories
> Found 2 items
> -rw-r--r--   1 cloudera hive    0 2014-11-05 13:18 
> /user/hive/warehouse/categories/_SUCCESS
> -rw-r--r--   1 cloudera hive 1344 2014-11-05 13:18 
> /user/hive/warehouse/categories/part-m-00000.avro
> [cloudera@quickstart ~]$
> [cloudera@quickstart ~]$
> I imported a table using Sqoop.
>
> I tried the following commands but they are not working:
> --
> Found 2 items
> -rw-r--r--   1 cloudera hive    0 2014-11-05 13:18 
> /user/hive/warehouse/categories/_SUCCESS
> -rw-r--r--   1 cloudera hive 1344 2014-11-05 13:18 
> /user/hive/warehouse/categories/part-m-00000.avro
> [cloudera@quickstart ~]$
> [cloudera@quickstart ~]$
> [cloudera@quickstart ~]$ hdfs dfs -text 
> /user/hive/warehouse/categories/_SUCCESS
> [cloudera@quickstart ~]$
> [cloudera@quickstart ~]$ hdfs dfs -text 
> /user/hive/warehouse/categories/_SUCCESS
> [cloudera@quickstart ~]$
> [cloudera@quickstart ~]$ hdfs dfs -text 
> /user/hive/warehouse/categories/part-m-00000.avro
> -text: URI scheme is not "file"
> Usage: hadoop fs [generic options] -text [-ignoreCrc] <src> ...
> [cloudera@quickstart ~]$ hadoop fs -text 
> /user/hive/warehouse/categories/part-m-00000.avro
> -text: URI scheme is not "file"
> Usage: hadoop fs [generic options] -text [-ignoreCrc] <src> ...
> [cloudera@quickstart ~]$
>
> David Novogrodsky
> david.novogrodsky@gmail.com <mailto:david.novogrodsky@gmail.com>
> http://www.linkedin.com/in/davidnovogrodsky


Mime
View raw message