incubator-blur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron McCurry <amccu...@gmail.com>
Subject New API Prototype
Date Fri, 05 Oct 2012 02:39:53 GMT
I have created a new prototype API for Blur and it is vastly simpler.
I have also created a small embedded server that implements this API.
I have attached the Thrift definition file for quick evaluation.  If
you have some time please take a look at the project and let me know
what you think.  Thanks!

Aaron

git branch new-api-prototype

Project src/blur-new-api-prototype


///////////// Thrift definition
namespace java org.apache.blur.thrift.generated

exception BlurException {
  1:string message,
  2:string stackTraceStr
}

enum TYPE {
  STRING, BOOL, SHORT, INT, LONG, FLOAT, DOUBLE, BINARY
}

struct Attribute {
  1:string name,
  2:binary value,
  3:TYPE type
}

struct Tuple {
  1:list<Attribute> attributes
}

struct Session {
  1:string sessionId
}

service BlurTuple {

  Session openReadSession() throws (1:BlurException e)
  void executeQuery(1:Session session, 2:string query) throws
(1:BlurException e)
  list<Tuple> nextMetaDataResults(1:Session session, 2:i32 batchSize)
throws (1:BlurException e)
  list<Tuple> nextResults(1:Session session, 2:i32 batchSize) throws
(1:BlurException e)
  void closeReadSession(1:Session session) throws (1:BlurException e)

  Session openWriteSession() throws (1:BlurException e)
  void writeTuples(1:Session session, 2:list<Tuple> tuples) throws
(1:BlurException e)
  void commitWriteSession(1:Session session) throws (1:BlurException e)
  void rollbackWriteSession(1:Session session) throws (1:BlurException e)

}

Mime
View raw message