示例#1
0
  print "Success"

ret = py_hypertable.get_schema("hello")
print ret
print "checking schema:"
print ret
if ret[1:] != columns:
  print "ERROR in recieved schema"
  print "returned: " + str(ret)
  print "expected: " + str(columns)

#ret = py_hypertable.__table_exist(table_name)
#print "Does table we just created exist?"
#print ret

ret = py_hypertable.delete_row(table_name, key)
print "Deleting the key %s"%key
print ret

ret = py_hypertable.get_entity(table_name, key, columns)
print "Trying to get deleted key:"
print ret
print "doing a put with key %s"%key
print py_hypertable.put_entity("hello", "1", ["a","b","c"], ["1","2","3"])
print "doing a get table" 
print py_hypertable.get_table("hello", ["a","b","c"])
py_hypertable.put_entity("hello", "2", ["a","b","c"], ["4","5","6"])
print "doing get table:"
print py_hypertable.get_table("hello", ["a","b","c"])
py_hypertable.put_entity("hello", "3", ["a","b","c"], ["1","2","3"])
py_hypertable.get_table("hello", ["a","b","c"])
示例#2
0
print "does this newly table exist:"
print py_hypertable.__table_exist(table)

print "doing a get entity for row key 1:"
print py_hypertable.get_entity(table, "1", ["c1", "c2", "c3"])
print "doing a get entity for row key 2:"
print py_hypertable.get_entity(table, "2", ["c1", "c2", "c3"])
print "how many rows are in this table?"
print py_hypertable.get_row_count(table)
print "getting entire table:"
print py_hypertable.get_table(table, ["c1","c2","c3"])

print "what happens when trying to do a get on a table that doesnt exist:"
print py_hypertable.get_entity("qwerty", "1", ["a","b","c"])

print "query that table"
print py_hypertable.__query_table(table)

print "delete row from table ",table
print py_hypertable.delete_row(table, "1")

print "Doing a get on that which was deleted"
print py_hypertable.get_entity(table, "1", ["c1", "c2", "c3"])
print "query the table"
print py_hypertable.__query_table(table)
print "doing a get entity:"
print py_hypertable.get_entity(table, "1", ["c1", "c2", "c3"])
print "getting entire table:"
print py_hypertable.get_table(table, ["c1","c2","c3"])

    print "Success"

ret = py_hypertable.get_schema("hello")
print ret
print "checking schema:"
print ret
if ret[1:] != columns:
    print "ERROR in recieved schema"
    print "returned: " + str(ret)
    print "expected: " + str(columns)

#ret = py_hypertable.__table_exist(table_name)
#print "Does table we just created exist?"
#print ret

ret = py_hypertable.delete_row(table_name, key)
print "Deleting the key %s" % key
print ret

ret = py_hypertable.get_entity(table_name, key, columns)
print "Trying to get deleted key:"
print ret
print "doing a put with key %s" % key
print py_hypertable.put_entity("hello", "1", ["a", "b", "c"], ["1", "2", "3"])
print "doing a get table"
print py_hypertable.get_table("hello", ["a", "b", "c"])
py_hypertable.put_entity("hello", "2", ["a", "b", "c"], ["4", "5", "6"])
print "doing get table:"
print py_hypertable.get_table("hello", ["a", "b", "c"])
py_hypertable.put_entity("hello", "3", ["a", "b", "c"], ["1", "2", "3"])
py_hypertable.get_table("hello", ["a", "b", "c"])
示例#4
0
                               ["d4", "e5", "f6"])
print "does this newly table exist:"
print py_hypertable.__table_exist(table)

print "doing a get entity for row key 1:"
print py_hypertable.get_entity(table, "1", ["c1", "c2", "c3"])
print "doing a get entity for row key 2:"
print py_hypertable.get_entity(table, "2", ["c1", "c2", "c3"])
print "how many rows are in this table?"
print py_hypertable.get_row_count(table)
print "getting entire table:"
print py_hypertable.get_table(table, ["c1", "c2", "c3"])

print "what happens when trying to do a get on a table that doesnt exist:"
print py_hypertable.get_entity("qwerty", "1", ["a", "b", "c"])

print "query that table"
print py_hypertable.__query_table(table)

print "delete row from table ", table
print py_hypertable.delete_row(table, "1")

print "Doing a get on that which was deleted"
print py_hypertable.get_entity(table, "1", ["c1", "c2", "c3"])
print "query the table"
print py_hypertable.__query_table(table)
print "doing a get entity:"
print py_hypertable.get_entity(table, "1", ["c1", "c2", "c3"])
print "getting entire table:"
print py_hypertable.get_table(table, ["c1", "c2", "c3"])