Hi, Haina,

>From the log messages, it appears that your query only produced one
row.  To see whether this is the right answer, you might want to try a
few simpler variations of your query, such as

select addr, count(*) where 1=1

(this will tell you how many distinct values in addr)

select addr, sum(bytes) where 1=1

(this will tell you whether sum(bytes) is computed correctly)

select addr, sum(bytes) as s where 1=1 order by s

(if this one returns the expected answer, then the problem is in our
implementation of desc)

Please run these queries and send us the log messages if you would
like us to diagnose the problem.  Thanks.

John


On 6/10/2010 5:36 PM, Tang Haina wrote:
> Dear Wu,
> I used the following command line:
> /****************************************************************/
> ./ibis -v -i -d tmp -o a.txt
> 
> ibis> select ADDR,sum(BYTES) where 1=1 order by sum(BYTES) desc limit 1000
> 
> ibis::liga -- constructed table T-tmp (a simple list of partition: tmp) 
> from a list of 1 data partition, with 19 columns and 53429252 rows
> tableSelect -- the number of hits is 53429252
> countQuery::evaluate -- Select count(*) From tmp Where 1 == 1 --> 53429161
> countQuery::evaluate -- duration: 0.001 sec(CPU), 5.72205e-05 sec(elapsed)
> ibis::bord::part constructed in-memory data partition XCWVwY -- 
> table::select(1 data partition, ADDR,sum(BYTES), qExpr @0xf40b2e0)
> with 53429161 rows and 2 columns
> ibis::bord::part constructed in-memory data partition WmFmo9 -- GROUP BY 
> ADDR,sum(BYTES) on table XCWVwY (table::select(1 data partition, 
> ADDR,sum(BYTES), qExpr @0xf40b2e0))
> with 1 row and 3 columns
> tableSelect -- select(ADDR,sum(BYTES), 1=1 ) on table T-tmp produced a 
> table with 1 row and 3 columns
> tableSelect:: complete evaluation of SELECT ADDR,sum(BYTES) FROM T-tmp 
> WHERE 1=1 ORDER BY sum(BYTES) DESC LIMIT 1000 took 2.6386 CPU seconds, 
> 2.63841 elapsed seconds
> 
> /*********************************************************************/
> 
> So now I see the a.txt, it still just have one line:
> 
> -5, 0, 53429161
> 
> I don't know why. Have you ever encountered such things? Maybe the 
> problem is costed by GROUP BY ADDR,sum(BYTES) , because I just want to 
> GROUP BY ADDR.
> 
> Thanks alot
> 
> Haina
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  > Hi, Haina,
>  >
>  > Here are a couple of suggestions.
>  >
>  > -- remove ':' in front of 1000. The command ibis is expecting a
>  > simple number
>  >
>  > -- if you are dumping the output to script through ibis, there is a
>  > limit based on the verboseness level (specified through the -v
>  > option). You can bypass this limit by redirecting the results to a
>  > file through the -o option.
>  >
>  > The above limit in the number of rows to print is in ibis.cpp. When
>  > you write your own program, you can decide how to handle it in a
>  > different way.
>  >
>  > John
>  >
>  >
>  > On 6/10/2010 2:02 AM, Tang Haina wrote:
>  > > Dear Wu,
>  > > Your message is very helpful. Yes, now I can use ardea under the 
> example
>  > > dir.
>  > > I want to use fastbit to deal with netflow data(just like ntop has
>  > > done). I want to query the top 1000 host who has the most traffic
>  > > volume. I use the query sentence:
>  > > 
> /*******************************************************************************/
>  
> 
>  > >
>  > > select ADDR,sum(BYTES) where 1=1 order by sum(BYTES) desc limit :1000;
>  > >
>  > >
>  > > Warning -- parseString(select ADDR,sum(BYTES) where 1=1 order by
>  > > sum(BYTES) desc limit :1000;) reached a unexpected end of string 
> ":1000;"
>  > > ibis::liga -- constructed table T-tmp (a simple list of partition: 
> tmp)
>  > > from a list of 1 data partition, with 19 columns and 53429252 rows
>  > > tableSelect -- the number of hits is 53429252
>  > > countQuery::evaluate -- Select count(*) From tmp Where 1 == 1 --> 
> 53429161
>  > > countQuery::evaluate -- duration: 0 sec(CPU), 4.88758e-05 sec(elapsed)
>  > > ibis::bord::part constructed in-memory data partition Tm4h6A --
>  > > table::select(1 data partition, ADDR,sum(BYTES), qExpr @0x1a291fe0)
>  > > with 53429161 rows and 2 columns
>  > > ibis::bord::part constructed in-memory data partition X1PAPg -- 
> GROUP BY
>  > > ADDR,sum(BYTES) on table Tm4h6A (table::select(1 data partition,
>  > > ADDR,sum(BYTES), qExpr @0x1a291fe0))
>  > > with 1 row and 3 columns
>  > > tableSelect -- select(ADDR,sum(BYTES), 1=1 ) on table T-tmp produced a
>  > > table with 1 row and 3 columns
>  > > tableSelect:: complete evaluation of SELECT ADDR,sum(BYTES) FROM T-tmp
>  > > WHERE 1=1 ORDER BY sum(BYTES) DESC took 2.54361 CPU seconds, 2.54298
>  > > elapsed seconds
>  > >
>  > >
>  > > 
> /*****************************************************************************/
>  
> 
>  > >
>  > >
>  > > The output is:
>  > >
>  > > -5, 0, 53429161
>  > >
>  > > I don't know why, the output is just one line not as I expected.
>  > >
>  > > Thanks alot!
>  > >
>  > > Haina
>  > >
>  > >
>  > >
>  > >
>  > > > Hi, Haina,
>  > > >
>  > > > There are a few different ways of addressing the problem you've
>  > > > encountered. Here are two suggestions.
>  > > >
>  > > > -- simply use the executable from the examples directory. They 
> should
>  > > > work (without the need to do 'make install').
>  > > >
>  > > > -- add the lib directory to your LD_LIBRARY_PATH. Based on the error
>  > > > message, I would guess that you are using a linux machine (or 
> another
>  > > > unix flavor). If this is true, then you need to modify your
>  > > > LD_LIBRARY_PATH. For example, you have installed FastBit into
>  > > > /usr/local (the default behavior), then the following command line
>  > > > might be what you need (if you are using bash, the default shell 
> on a
>  > > > typical linux machine)
>  > > >
>  > > > LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH:-/usr/lib:/lib}
>  > > >
>  > > >
>  > > > Hope this helps.
>  > > >
>  > > > John
>  > > >
>  > > >
>  > > > On 6/9/2010 7:53 PM, Tang Haina wrote:
>  > > > > Dear ALL,
>  > > > > I have successfully installed fastbit.
>  > > > > But when I excuted ./ardea, it says:
>  > > > > ./ardea: error while loading shared libraries: libfastbit.so.0: 
> cannot
>  > > > > open shared object file: No such file or directory
>  > > > > in fact I can see libfastbit.so.0 under the lib directory.
>  > > > > Why?
>  > > > > Best regards
>  > > > > Haina
>  > > > >
>  > > > >
>  > > > >
>  > > > >
>  > > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  >
> 
> 
> 
> 
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to