Hi, I want to query my clips using FPPoolQuery.fetchResult(60000) and get back a result code of FPLibraryConstants.FP_QUERY_RESULT_CODE_ABORT with the first call to fetchResult. I am using the profile emea1_profile1_rdqeDcw.pea
Do I query the wrong server or are my input parameters wrong?
My parameters are as following (human readable)
DEBUG: compiling patterns ...
DEBUG: [query] date from is 12.01.2009 00:00:00
DEBUG: [query] date to is 30.01.2009 00:00:00
DEBUG: [query] including existing clips
DEBUG: [query] including deleted clips
DEBUG: [query] selected fields are creation-date name type
DEBUG: creating pool query ...
TRACE: [000] fetching result
TRACE: [000] result is 4
The query has been aborted because of a problem at the server side. The application may want to resubmit the query
regards, Chris
P.S. here is also my source code
publicorg.jdom.Document query( Calendar from
, Calendar to
,booleanincludeExistingClips
,booleanincludeDeletedClips
,booleanincludeClipDetails
, Set selectedFields
, Map fieldRegExps
, Long queryTimeout
, Integer maxRetries
)throwsCenteraException{
try{
/*
* compile patterns
*/
logger.debug("compiling patterns ...");
Map patterns = newHashMap ();
if(fieldRegExps !=null) {
for(Map.Entry e : fieldRegExps.entrySet()) {
try{
Pattern p = Pattern.compile(e.getValue());
patterns.put(e.getKey(), p);
}catch(Exception ex) {
thrownewCenteraException(
String.format("error while parsing regexp '%s' into pattern: %s", e.getValue(), ex.getMessage()), ex);
}
}
}
/*
* createCenterasearch expression
*/
FPQueryExpression exp =newFPQueryExpression();
if(from !=null) {
logger.debug(String.format("[query] date from is %s",DF_DISPLAY.format(from.getTime())));
exp.setStartTime(from.getTimeInMillis());
}if(to !=null) {
logger.debug(String.format("[query] date to is %s",DF_DISPLAY.format(to.getTime())));
exp.setEndTime(to.getTimeInMillis());
}
inttype = 0;
if(includeExistingClips) {
logger.debug("[query] including existing clips");
type |= FPLibraryConstants.FP_QUERY_TYPE_EXISTING;
}
if(includeDeletedClips) {
logger.debug("[query] including deleted clips");
type |= FPLibraryConstants.FP_QUERY_TYPE_DELETED;
}
exp.setType(type);
StringBuilder buf =newStringBuilder();
for(String field: selectedFields) {
buf.append(field);
buf.append(" ");
exp.selectField(field);
}
logger.debug(String.format("[query] selected fields are %s", buf.toString()));
Purnawan_Henky
15 Posts
201
0
Posted January 13th, 2009 03:00
Hi Chris,
I quote from Centera API Reference Guide as following:
FP_QUERY_RESULT_CODE_ABORT - The query has aborted due to a problem
on the cluster or because the start time for the query expression is later than the
current server time. Check the start time and retry the query.
In my test, if end time is later than the current server time, this error will come up too.
Pls make sure the range of time is not later than current server time.
ps. To get cluster time, you can call FPPool.getClusterTime().
Best regards,
Henky