StatementResult@Deprecated public interface StatementResult
ExecutionFuture.updateStatus(), it can
represent information about either a completed or in progress operation. If
obtained via ExecutionFuture.get() or TableAPI.executeSync(java.lang.String), it
represents the final status of a finished operation.
JSON format for results:
Additional information about the statement execution is available via
getInfo() or getInfoAsJson(). The
former is formatted for human readability, whereas the latter provides
a JSON version of the same information. The JSON info may be one of four
types: show, describe, noop, plan
A plan result provides the output of a data definition statement which was executed on the server. This output can be correlated to the information visible from the Admin CLI and other monitoring tools.
{
"type" : "plan",
"planInfo" : {
"id" : 6,
"name" : "CreateIndex:users:LastName",
"isDone" : true,
"state" : "SUCCEEDED",
"start" : "2014-10-29 18:41:12 UTC",
"interrupted" : null,
"end" : "2014-10-29 18:41:12 UTC",
"error" : null,
"executionDetails" : {
"taskCounts" : {
"total" : 3,
"successful" : 3,
"failed" : 0,
"interrupted" : 0,
"incomplete" : 0,
"notStarted" : 0
},
"finished" : [ {
"taskNum" : 1,
"name" : "StartAddIndex:users:LastName",
"state" : "SUCCEEDED",
"start" : "2014-10-29 18:41:12 UTC",
"end" : "2014-10-29 18:41:12 UTC"
}, {
"taskNum" : 2,
"name" : "WaitForAddIndex:users:LastName",
"state" : "SUCCEEDED",
"start" : "2014-10-29 18:41:12 UTC",
"end" : "2014-10-29 18:41:12 UTC"
}, {
"taskNum" : 3,
"name" : "CompleteAddIndex:users:LastName",
"state" : "SUCCEEDED",
"start" : "2014-10-29 18:41:12 UTC",
"end" : "2014-10-29 18:41:12 UTC"
} ],
"running" : [ ],
"pending" : [ ]
}
}
}
A show result provides the output of a SHOW statement:
{
"type" : "show",
"result" : {"tableHierarchy" : ["users"]}
}
A describe result provides the output of a DESCRIBE statement:
{
"type" : "describe",
"result" : {
"type" : "table",
"name" : "users",
"comment" : null,
"shardKey" : [ "id" ],
"primaryKey" : [ "id" ],
"fields" : [ {
"name" : "id",
"type" : "INTEGER",
"nullable" : true,
"default" : null
}, {
"name" : "firstName",
"type" : "STRING",
"nullable" : true,
"default" : null
}, {
"name" : "lastName",
"type" : "STRING",
"nullable" : true,
"default" : null
}, {
"name" : "age",
"type" : "INTEGER",
"nullable" : true,
"default" : null
} ],
"indexes" : [ {
"name" : "LastName",
"comment" : null,
"fields" : [ "lastName" ]
} ]
}
}
A noop result is returned when the statement did not result in any
processing.
{
"type" : "noop",
"comment" : "Statement did not require execution"
}
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage()
Deprecated.
If
isSuccessful() is false, return a description of the
problem. |
String |
getInfo()
Deprecated.
Returns information about the execution of the statement, in human
readable form.
|
String |
getInfoAsJson()
Deprecated.
Get detailed information about the execution of the statement in JSON
text.
|
int |
getPlanId()
Deprecated.
Returns the administrative plan id for this operation if the statement
was a create or remove table, a create or remove index, or an alter
index.
|
boolean |
isCancelled()
Deprecated.
Return true if the statement had been cancelled.
|
boolean |
isDone()
Deprecated.
Return true if the statement completed.
|
boolean |
isSuccessful()
Deprecated.
Return true if this statement has finished and was successful.
|
int getPlanId()
The plan id will be 0 if this statement was not an administrative operation, or did not require execution.
String getInfo()
String getInfoAsJson()
String getErrorMessage()
isSuccessful() is false, return a description of the
problem. Will be null if isSuccessful() is true.boolean isSuccessful()
boolean isDone()
ExecutionFuture.isDone()boolean isCancelled()
ExecutionFuture.isCancelled()ExecutionFuture.cancel(boolean)Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.