You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Sujit Dhamale <su...@gmail.com> on 2013/03/13 05:31:12 UTC

getting Error while importing FileStatus Class

Hi Everyone,
need help for getting File Status.

while importing org.apache.hadoop.fs.FileStatus;

getting error  *"The import org.apache.hadoop.fs.FileStatus conflicts with
a type defined in the same file"*

*Hadoop Version :*1.0.4

*Java Class : *

package fs;
import java.net.URI;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
*import org.apache.hadoop.fs.FileStatus;*
import org.apache.hadoop.fs.Path;
public class FileStatus
{
    public static void main(String [] args) throws Exception
    {
        String uri=args[0];
        Configuration conf=new Configuration();
        FileSystem fs = FileSystem.get(conf);
        Path file1=new Path("/sujit.txt");

    }

}



Kind Regards
Sujit Dhamale
(+91 9970086652)

Re: getting Error while importing FileStatus Class

Posted by Ted <yu...@gmail.com>.
Your class is also named FileStatus :-)

On Mar 12, 2013, at 9:31 PM, Sujit Dhamale <su...@gmail.com> wrote:

> Hi Everyone, 
> need help for getting File Status.
> 
> while importing org.apache.hadoop.fs.FileStatus;
> 
> getting error  "The import org.apache.hadoop.fs.FileStatus conflicts with a type defined in the same file"
> 
> Hadoop Version :1.0.4
> 
> Java Class : 
> 
> package fs;
> import java.net.URI;
> import org.apache.hadoop.conf.Configuration;
> import org.apache.hadoop.fs.FileSystem;
> import org.apache.hadoop.fs.FileStatus;
> import org.apache.hadoop.fs.Path;
> public class FileStatus 
> {
>     public static void main(String [] args) throws Exception
>     {
>         String uri=args[0];
>         Configuration conf=new Configuration();
>         FileSystem fs = FileSystem.get(conf);
>         Path file1=new Path("/sujit.txt");
>             
>     }
>     
> }
> 
> 
> 
> Kind Regards
> Sujit Dhamale
> (+91 9970086652)

Re: getting Error while importing FileStatus Class

Posted by Ted <yu...@gmail.com>.
Your class is also named FileStatus :-)

On Mar 12, 2013, at 9:31 PM, Sujit Dhamale <su...@gmail.com> wrote:

> Hi Everyone, 
> need help for getting File Status.
> 
> while importing org.apache.hadoop.fs.FileStatus;
> 
> getting error  "The import org.apache.hadoop.fs.FileStatus conflicts with a type defined in the same file"
> 
> Hadoop Version :1.0.4
> 
> Java Class : 
> 
> package fs;
> import java.net.URI;
> import org.apache.hadoop.conf.Configuration;
> import org.apache.hadoop.fs.FileSystem;
> import org.apache.hadoop.fs.FileStatus;
> import org.apache.hadoop.fs.Path;
> public class FileStatus 
> {
>     public static void main(String [] args) throws Exception
>     {
>         String uri=args[0];
>         Configuration conf=new Configuration();
>         FileSystem fs = FileSystem.get(conf);
>         Path file1=new Path("/sujit.txt");
>             
>     }
>     
> }
> 
> 
> 
> Kind Regards
> Sujit Dhamale
> (+91 9970086652)

Re: getting Error while importing FileStatus Class

Posted by Ted <yu...@gmail.com>.
Your class is also named FileStatus :-)

On Mar 12, 2013, at 9:31 PM, Sujit Dhamale <su...@gmail.com> wrote:

> Hi Everyone, 
> need help for getting File Status.
> 
> while importing org.apache.hadoop.fs.FileStatus;
> 
> getting error  "The import org.apache.hadoop.fs.FileStatus conflicts with a type defined in the same file"
> 
> Hadoop Version :1.0.4
> 
> Java Class : 
> 
> package fs;
> import java.net.URI;
> import org.apache.hadoop.conf.Configuration;
> import org.apache.hadoop.fs.FileSystem;
> import org.apache.hadoop.fs.FileStatus;
> import org.apache.hadoop.fs.Path;
> public class FileStatus 
> {
>     public static void main(String [] args) throws Exception
>     {
>         String uri=args[0];
>         Configuration conf=new Configuration();
>         FileSystem fs = FileSystem.get(conf);
>         Path file1=new Path("/sujit.txt");
>             
>     }
>     
> }
> 
> 
> 
> Kind Regards
> Sujit Dhamale
> (+91 9970086652)

Re: getting Error while importing FileStatus Class

Posted by Ted <yu...@gmail.com>.
Your class is also named FileStatus :-)

On Mar 12, 2013, at 9:31 PM, Sujit Dhamale <su...@gmail.com> wrote:

> Hi Everyone, 
> need help for getting File Status.
> 
> while importing org.apache.hadoop.fs.FileStatus;
> 
> getting error  "The import org.apache.hadoop.fs.FileStatus conflicts with a type defined in the same file"
> 
> Hadoop Version :1.0.4
> 
> Java Class : 
> 
> package fs;
> import java.net.URI;
> import org.apache.hadoop.conf.Configuration;
> import org.apache.hadoop.fs.FileSystem;
> import org.apache.hadoop.fs.FileStatus;
> import org.apache.hadoop.fs.Path;
> public class FileStatus 
> {
>     public static void main(String [] args) throws Exception
>     {
>         String uri=args[0];
>         Configuration conf=new Configuration();
>         FileSystem fs = FileSystem.get(conf);
>         Path file1=new Path("/sujit.txt");
>             
>     }
>     
> }
> 
> 
> 
> Kind Regards
> Sujit Dhamale
> (+91 9970086652)