小猿圈分享Java建立表格

private static void putRow(SyncClient client, String pkValue) { // 構造主鍵 PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); primaryKeyBuilder.addPrimaryKeyColumn(PRIMARY_KEY_NAME, PrimaryKeyValue.fromString(pkValue)); PrimaryKey primaryKey = primaryKeyBuilder.build();git

RowPutChange rowPutChange = new RowPutChange(TABLE_NAME, primaryKey); 


    // 加入一些屬性列 
    rowPutChange.addColumn("truckId", ColumnValue.fromLong(1)); 
    rowPutChange.addColumn("longitude", ColumnValue.fromString("30")); 
    rowPutChange.addColumn("latitude", ColumnValue.fromString("35")); 
    rowPutChange.addColumn("updateTime", ColumnValue.fromString(StringUtil.trim(new Date()))); 
    client.putRow(new PutRowRequest(rowPutChange)); 
} 
複製代碼

異常:ui

操做失敗,詳情:Validate PK size fail. Input: 1, Meta: 2. Request ID:00055eb6-24b7-87ae-8cd8-970a00401a01spa

相關文章
相關標籤/搜索