hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hari Sreekumar <hsreeku...@clickable.com>
Subject setup() and cleanup() methods
Date Mon, 13 Dec 2010 17:26:10 GMT
    I am using the setup() and cleanup() methods as follows:

        protected void setup(Context context) throws IOException,
InterruptedException {
            HBaseConfiguration conf = new
            System.out.println("Opening table NwKeyword");
            keywordTable = new HTable(conf, "NwKeyword");
            System.out.println("Table opened");

        protected void cleanup(Context context) throws IOException,
InterruptedException {
            System.out.println("Table closed");

        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?


View raw message