You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Daegyu Han <hd...@gmail.com> on 2019/05/31 05:46:12 UTC

How to run Test class for HDFS?

Hi all,

I want to run a unit test by using hadoop-hdfs-2.9.2-tests.jar in
hadoop-2.9.2/share/hadoop/hdfs.

1.
It didn't work to run the followed command.
(yarn jar hadoop-2.9.2/share/hadoop/hdfs/hadoop-hdfs-2.9.2-tests.jar
TestWriteRead)
The error message said that there is no main class name.

2.
I also tried to manually compile the wordcount class and it failed.
- javac -classpath ${HADOOP_CLASSPATH} -d
'hdfs-test/TestWriteRead-cp/'
'/home/hduser/hdfs-test/TestWriteRead.java'
- jar -cvf TestRW.jar -c TestWriteRead-cp .
but it didn't work.

How Can I run hdfs-tests.jar ??

Best Regards,
Daegyu Han

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
For additional commands, e-mail: user-help@hadoop.apache.org


Re: How to run Test class for HDFS?

Posted by Daegyu Han <hd...@gmail.com>.
Thanks, it worked.

Best Regards,
Daegyu

2019년 5월 31일 (금) 오후 3:44, Ayush Saxena <ay...@gmail.com>님이 작성:
>
> Try giving the name as org.apache.hadoop.hdfs.TestWriteRead
> With package name
>
> > On 31-May-2019, at 11:16 AM, Daegyu Han <hd...@gmail.com> wrote:
> >
> > Hi all,
> >
> > I want to run a unit test by using hadoop-hdfs-2.9.2-tests.jar in
> > hadoop-2.9.2/share/hadoop/hdfs.
> >
> > 1.
> > It didn't work to run the followed command.
> > (yarn jar hadoop-2.9.2/share/hadoop/hdfs/hadoop-hdfs-2.9.2-tests.jar
> > TestWriteRead)
> > The error message said that there is no main class name.
> >
> > 2.
> > I also tried to manually compile the wordcount class and it failed.
> > - javac -classpath ${HADOOP_CLASSPATH} -d
> > 'hdfs-test/TestWriteRead-cp/'
> > '/home/hduser/hdfs-test/TestWriteRead.java'
> > - jar -cvf TestRW.jar -c TestWriteRead-cp .
> > but it didn't work.
> >
> > How Can I run hdfs-tests.jar ??
> >
> > Best Regards,
> > Daegyu Han
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
> > For additional commands, e-mail: user-help@hadoop.apache.org
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
For additional commands, e-mail: user-help@hadoop.apache.org


Re: How to run Test class for HDFS?

Posted by Ayush Saxena <ay...@gmail.com>.
Try giving the name as org.apache.hadoop.hdfs.TestWriteRead
With package name

> On 31-May-2019, at 11:16 AM, Daegyu Han <hd...@gmail.com> wrote:
> 
> Hi all,
> 
> I want to run a unit test by using hadoop-hdfs-2.9.2-tests.jar in
> hadoop-2.9.2/share/hadoop/hdfs.
> 
> 1.
> It didn't work to run the followed command.
> (yarn jar hadoop-2.9.2/share/hadoop/hdfs/hadoop-hdfs-2.9.2-tests.jar
> TestWriteRead)
> The error message said that there is no main class name.
> 
> 2.
> I also tried to manually compile the wordcount class and it failed.
> - javac -classpath ${HADOOP_CLASSPATH} -d
> 'hdfs-test/TestWriteRead-cp/'
> '/home/hduser/hdfs-test/TestWriteRead.java'
> - jar -cvf TestRW.jar -c TestWriteRead-cp .
> but it didn't work.
> 
> How Can I run hdfs-tests.jar ??
> 
> Best Regards,
> Daegyu Han
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
> For additional commands, e-mail: user-help@hadoop.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
For additional commands, e-mail: user-help@hadoop.apache.org