hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Goodhope <kengoodh...@gmail.com>
Subject Re: setup() and cleanup() methods
Date Mon, 13 Dec 2010 19:07:38 GMT
If you look in your logs directory, you will see a subdir called userlogs.
Inside there you will see a directory for every task.  Those directories
contain stdout, stderr, and system.

On Mon, Dec 13, 2010 at 9:26 AM, Hari Sreekumar <hsreekumar@clickable.com>wrote:

> Hi,
>     I am using the setup() and cleanup() methods as follows:
>
>        @Override
>         protected void setup(Context context) throws IOException,
> InterruptedException {
>             HBaseConfiguration conf = new
> HBaseConfiguration(context.getConfiguration());
>             System.out.println("Opening table NwKeyword");
>             keywordTable = new HTable(conf, "NwKeyword");
>             System.out.println("Table opened");
>         }
>
>         @Override
>         protected void cleanup(Context context) throws IOException,
> InterruptedException {
>             keywordTable.close();
>             System.out.println("Table closed");
>         }
>
>         @Override
>         public void reduce(Text key, Iterable<Text> values, Context
> context) throws IOException, InterruptedException {
>             ......
>
> I know that the setup method is being called because I can use the
> keywordTable in my reduce function, which I cannot do if I don't initialize
> the table in setup(). But the System.out.println statement is not getting
> printed. I checked the sysout as well as the job logs. Where does/should it
> get printed?
>
> Thanks,
> hari
>

Mime
View raw message