Giter VIP home page Giter VIP logo

ots's People

Contributors

coolme200 avatar edwardliwang avatar fengmk2 avatar jacksontian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ots's Issues

protocol/ots_protocol.proto

package com.aliyun.cloudservice.ots;

/* common structure */
enum ColumnType {
    INF_MIN = 0;
    INF_MAX = 1;
    INTEGER = 2;
    STRING = 3;
    BOOLEAN = 4;
    DOUBLE = 5;
}

message ColumnSchema {
    required string name = 1;
    required ColumnType type = 2;
}

message ColumnValue {
    required ColumnType type = 1;
    optional int64 value_i = 2;
    optional string value_s = 3;
    optional bool value_b = 4;
    optional double value_d = 5;
}

message Column {
    required string name = 1;
    required ColumnValue value = 2;
}

message Row {
    repeated Column primary_keys = 1;
    repeated Column columns = 2;
}

message RowPutChange {
    enum CheckingType {
        NO = 0;
        UPDATE = 1;
        INSERT = 2;
    }

    required Row row = 1;
    required CheckingType checking_type = 2 [default = NO];
}

message RowDeleteChange {
    repeated Column primary_keys = 1;
    repeated string column_names = 2;
}

message ViewMeta {
    required string view_name = 1;
    repeated ColumnSchema primary_keys = 2;
    repeated ColumnSchema columns = 3;
}

message TableMeta {
    required string table_name = 1;
    repeated ViewMeta views = 2;
    repeated ColumnSchema primary_keys = 3;
    optional string table_group_name = 4;
}

message GetRowParameter {
    required string table_name = 1;
    repeated Column primary_keys = 2;
    repeated string column_names = 3;
}

message PutRowParameter {
    required string table_name = 1;
    required RowPutChange row_change = 2;
}

message DeleteRowParameter {
    required string table_name = 1;
    required RowDeleteChange row_change = 2;
}

message ErrorMessage {
    required string code = 1;
    optional string message = 2;
}

/* CreateTableGroup */
message CreateTableGroupRequest {
    required string table_group_name = 1;
    required ColumnType partition_key_type = 2;
}

// no response message

/* DeleteTableGroup */
message DeleteTableGroupRequest {
    required string table_group_name = 1;
}

// no response message

/* ListTableGroup */
// no request message

message ListTableGroupResponse {
    repeated string table_group_names = 1;
}

/* CreateTable */
message CreateTableRequest {
    required TableMeta table_meta = 1;
}

// no response message

/* ListTable */
// no request message

message ListTableResponse {
    repeated string table_names = 1;
}

/* GetTableMeta */
message GetTableMetaRequest {
    required string table_name = 1;
}

message GetTableMetaResponse {
    required TableMeta table_meta = 1;
}

/* DeleteTable */
message DeleteTableRequest {
    required string table_name = 1;
}

// no response message

/* StartTransaction */
message StartTransactionRequest {
    required string entity_name = 1;
    required ColumnValue partition_key_value = 2;
}

message StartTransactionResponse {
    required string transaction_id = 1;
}

/* AbortTransaction */
message AbortTransactionRequest {
    required string transaction_id = 1;
}

// no response message

/* CommitTransaction */
message CommitTransactionRequest {
    required string transaction_id = 1;
}

// no response message

/* GetRow */
message GetRowRequest {
    required GetRowParameter get_row_parameter = 1;
    optional string transaction_id = 2;
}

message GetRowResponse {
    required string table_name = 1;
    required Row row = 2;
}

/* GetRowsByRange */
message GetRowsByRangeRequest {
    required string table_name= 1;
    repeated Column primary_key_prefix = 2;
    required string range_key_name = 3;
    required ColumnValue range_begin = 4;
    required ColumnValue range_end = 5;
    repeated string column_names = 6;
    required bool is_reverse = 7 [default = false];
    optional uint32 limit = 8;
    optional string next_token = 9;
    optional string transaction_id = 10;
}

message GetRowsByRangeResponse {
    required string table_name = 1;
    repeated Row rows = 2;
    optional string next_token = 3;
}

/* PutRow */
message PutRowRequest {
    required PutRowParameter put_row_parameter = 1;
    optional string transaction_id = 2;
}

// no response message

/* DeleteRow */
message DeleteRowRequest {
    required DeleteRowParameter delete_row_parameter = 1;
    optional string transaction_id = 2;
}

// no response message

/* BatchModifyRow */
message ModifyItem {
    enum ModifyType {
        PUT = 0;
        DELETE = 1;
    }

    required ModifyType type = 1;
    optional RowPutChange row_put_change = 2;
    optional RowDeleteChange row_delete_change = 3;
}

message BatchModifyRowRequest {
    required string table_name = 1;
    repeated ModifyItem modify_items = 2;
    required string transaction_id = 3;
}

// no response message

/* MultiGetRow */
message MultiGetRowRequest {
    repeated GetRowParameter parameters = 1;
}

message MultiGetRowResponseItem {
     required bool is_succeed = 1;
     optional ErrorMessage error = 2;
     optional string table_name = 3;
     optional Row row = 4;
}

message MultiGetRowResponse {
     repeated MultiGetRowResponseItem items = 1;
}

/* MultiPutRow */
message MultiPutRowRequest {
    repeated PutRowParameter parameters = 1;
}

message MultiPutRowResponse {
    repeated ErrorMessage messages = 1;
}

/* MultiDeleteRow */
message MultiDeleteRowRequest {
    repeated DeleteRowParameter parameters = 1;
}

message MultiDeleteRowResponse {
    repeated ErrorMessage messages = 1;
}

这个项目还维护吗,报了很多错误啊!

windows 7 x64
node v: 7.1.0

D:\Node\bigData\node_modules\nan\nan.h(318): error C2039: 'New': is not a member of 'v8::String' (compiling source file ..\node-expat.cc) [D:\Node\bigData\node_modules\node-expat\build\node_expat.vcxproj]
  c:\users\admin\.node-gyp\7.1.0\include\node\v8.h(2093): note: see declaration of 'v8::String' (compiling source file ..\node-expat.cc)
D:\Node\bigData\node_modules\nan\nan.h(318): error C3861: 'New': identifier not found (compiling source file ..\node-expat.cc) [D:\Node\bigData\node_modules\node-expat\build\node_expat.vcxproj]
D:\Node\bigData\node_modules\nan\nan.h(322): error C2039: 'ThrowException': is not a member of 'v8' (compiling source file ..\node-expat.cc) [D:\Node\bigData\node_modules\node-expat\build\node_expat.vcxproj]
  c:\users\admin\.node-gyp\7.1.0\include\node\v8.h(69): note: see declaration of 'v8' (compiling source file ..\node-expat.cc)
...

support node 0.10

> [email protected] install /Users/mk2/git/ots/node_modules/xml2json-edp/node_modules/node-expat
> node-waf configure build

sh: node-waf: command not found
npm ERR! [email protected] install: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 127
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-expat
npm ERR! There is likely additional logging output above.

Error: Malformed message (uncaughtException throw 2 times on pid:216864)

image

2013-10-15 16:06:22.383 nodejs.ErrorException: Error: Malformed message (uncaughtException throw 2 times on pid:216864)
    at Function.parse (unknown source)
    at Client.request (/home/admin/datapi/target/datapi/node_modules/tcifapi/node_modules/ots/lib/client.js:990:30)
    at exports.request.done (/home/admin/datapi/target/datapi/node_modules/urllib/lib/urllib.js:196:5)
    at IncomingMessage.exports.request.timeout (/home/admin/datapi/target/datapi/node_modules/urllib/lib/urllib.js:310:7)
    at IncomingMessage.EventEmitter.emit (events.js:126:20)
    at IncomingMessage._emitEnd (http.js:366:10)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
    at Socket.socketOnData [as ondata] (http.js:1367:20)
    at TCP.onread (net.js:403:27)
pid: 216864
domainThrown: false
Host: datapi057085.pre.cm3
URL: 
Data: ""
2013-10-15 16:06:22.383

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.