Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19B7C17C48 for ; Fri, 7 Nov 2014 09:52:00 +0000 (UTC) Received: (qmail 20179 invoked by uid 500); 7 Nov 2014 09:51:54 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 20083 invoked by uid 500); 7 Nov 2014 09:51:54 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 19512 invoked by uid 99); 7 Nov 2014 09:51:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 09:51:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hadoop.support@visolve.com designates 173.11.74.250 as permitted sender) Received: from [173.11.74.250] (HELO mail.visolve.com) (173.11.74.250) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 09:51:49 +0000 Received: from ViMF (mail.visolve.com [173.11.74.250]) by mail.visolve.com (Postfix) with ESMTPA id 96A7822AB for ; Fri, 7 Nov 2014 01:51:06 -0800 (PST) Received: from abts-tn-static-154.230.165.122.airtelbroadband.in ([122.165.230.154] helo=sivaprakash.learning.com) by ViMF with ESMTP (ASSP 1.9); 7 Nov 2014 01:51:05 -0800 Message-ID: <545C95FA.2090907@visolve.com> Date: Fri, 07 Nov 2014 15:20:50 +0530 From: "hadoop.support@visolve.com" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: user@hadoop.apache.org Subject: Re: Is there a way to view the files in HDFS directly? References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------000309060004040705040305" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------000309060004040705040305 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello, In normal you can view the file by issuing the command #hadoop dfs -cat Default file store location in /user// 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] ... > [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] ... > [cloudera@quickstart ~]$ > > David Novogrodsky > david.novogrodsky@gmail.com > http://www.linkedin.com/in/davidnovogrodsky --------------000309060004040705040305 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ~]$


--------------000309060004040705040305--