Thanks, St.Ack I traced the Scan class and found that default constructor of the TimeRange class set "allTime" variable to true(default: false), so I try to modify a bit code as below:
Original: (#133~134 in Scan class) TimeRange ctr = scan.getTimeRange(); tr = new TimeRange(ctr.getMin(), ctr.getMax()); Modified: tr = scan.getTimeRange(); Everything is ok! Is it best solution? Thanks. Shen On Tue, Feb 23, 2010 at 1:07 AM, Stack <st...@duboce.net> wrote: > It looks like the Copy Constructor doesn't. This is a bit odd since I > believe the copy constructor is how filters, stop and start rows are > passed mapreducing. Any chance of your digging in to see if you can > figure whats up? What is not being "copied"? > > Thanks, > St.Ack > > On Sun, Feb 21, 2010 at 11:42 PM, ChingShen <chingshenc...@gmail.com> > wrote: > > Hi, > > > > I wrote a test code as below: (TableInputFormat using "new Scan(scan)") > > > > String tablename = "test8-1"; > > HBaseConfiguration config = new HBaseConfiguration(); > > HTable table = new HTable(config, tablename); > > Scan s1 = new Scan(); > > Scan s2 = new Scan(s1); > > ResultScanner rs = table.getScanner(s1); <== ok > > //ResultScanner rs = table.getScanner(s2); <== can't get bulk load data. > > Result r = null; > > while((r =rs.next()) != null) > > System.out.println("GET: " + r); > > > > But when I try to scan bulk load data by "new Scan(scan)" then failed. > > What's wrong? > > > > Thanks. > > > > Shen > > >