Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 926161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:38:23+00:00 2026-05-15T19:38:23+00:00

This is the weirdest thing ever. So I can see these files and cat

  • 0

This is the weirdest thing ever. So I can see these files and cat them:

[jchen@host hadoop-0.20.2]$ bin/hadoop fs -ls /users/jchen/                         
Found 3 items
-rw-r--r--   1 jchen supergroup   26553445 2010-07-14 21:10 /users/jchen/20100714T192827^AS17.data
-rw-r--r--   1 jchen supergroup  461957962 2010-07-14 21:10 /users/jchen/20100714T192857^AS1.data
-rw-r--r--   1 jchen supergroup   14026972 2010-07-14 21:10 /users/jchen/20100714T192949^AS311.data

[jchen@q01-ba-sas01 hadoop-0.20.2]$ bin/hadoop fs -cat /users/jchen/20100714T192949^AS311.data | head
SOME DATA

When I ls the file specifically:

[jchen@q01-ba-sas01 hadoop-0.20.2]$ bin/hadoop fs -ls /users/jchen/20100714T192949^AS311.data | head
ls: Cannot access /users/jchen/20100714T192949^AS311.data: No such file or directory

What the frack is going on here? The only thing I can think of is that I used a custom method in org.apache.hadoop.fs.FileSystem to post these files:

public boolean writeStreamToFile(boolean overwrite, 
                  InputStream src, Path dst)
    throws IOException {
    Configuration conf = getConf();
    return FileUtil.writeStream(src, this, dst, overwrite, conf);
}
//which calls this static method in org.apache.hadoop.fs.FileUtil:
public static boolean writeStream(InputStream src, 
                       FileSystem dstFS, Path dst,
                       boolean overwrite,
                       Configuration conf) throws IOException {

    dst = checkDest(dst.getName(), dstFS, dst, overwrite);

    OutputStream out=null;
    try{
        System.out.println("Started file creation");
        out = dstFS.create(dst, overwrite);
        System.out.println("completed file creation. starting stream copy");
        IOUtils.copyBytes(src, out, conf, true);
        System.out.println("completed stream copy.");
    } catch (IOException e) {
        IOUtils.closeStream(out);
        IOUtils.closeStream(src);
        throw e;
    }

    return true;
}

I’m kind of at a total loss here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:38:24+00:00Added an answer on May 15, 2026 at 7:38 pm

    According to this page the cat command takes URIs and the ls command just takes paths.

    Make sure that the path you are entering into the ls command is correct. As suggested by matt b, ensure all potentially invalid characters are escaped where possible.

    You could try using the hadoop support for the wildcard like so:

    /bin/hadoop rs -ls '/users/jchen/*AS311.data'

    I assume the cat command you are able to execute is allowing you to verify the data is being written correctly and therefore writeStreamToFile is OK?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the weirdest thing that has ever happened to me since I am
This is the weirdest thing I've ever seen. (Dead image removed, was a JPG
This is the weirdest thing I've ever encountered in my programming life. self.walls =
I just run into the weirdest thing I've ever encounter. Consider this test page:
this is the weirdest error I've ever got on Rails. Any idea what this
Hey this is the weirdest problem i've ever encoutered, I have 2 projects that's
Ok this is the weirdest thing I have seen in a while... I am
By far the weirdest thing I've ever seen. On some machines (!) IE (!!)
This is the weirdest thing I have come across. I am including jQuery as
I have a weirdest thing, in this peace of code a browser adds tags

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.