-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
664e61c
commit 0bbf35e
Showing
3 changed files
with
398 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
curl --request PUT \ | ||
--url http://localhost:9876/v1/table/no-locality-example >/dev/null 2>&1 | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/no-locality-example/column-family \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"column_families": [ | ||
{ | ||
"name": "language" | ||
}, | ||
{ | ||
"name": "title" | ||
} | ||
] | ||
}' >/dev/null 2>&1 | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/no-locality-example/write \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"items": [ | ||
{ | ||
"row_key": "org.apache.spark", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Spark™ - Unified Engine for large-scale data analytics" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.solr", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Welcome to Apache Solr - Apache Solr" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.hbase", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache HBase - Apache HBase™ Home" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.lucene", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Lucene - Welcome to Apache Lucene" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.kafka", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Kafka" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.cassandra", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Cassandra | Apache Cassandra Documentation" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.parquet", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Parquet" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.arrow", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Arrow | Apache Arrow" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
} | ||
] | ||
}' >/dev/null 2>&1 | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/no-locality-example/scan \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"row": { | ||
"prefix": "" | ||
}, | ||
"column": { | ||
"key": "title:" | ||
} | ||
}' 2>/dev/null | jq | ||
|
||
curl --request DELETE \ | ||
--url http://localhost:9876/v1/table/no-locality-example >/dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
curl --request PUT \ | ||
--url http://localhost:9876/v1/table/with-locality-example >/dev/null 2>&1 | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/with-locality-example/column-family \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"column_families": [ | ||
{ | ||
"name": "language" | ||
} | ||
] | ||
}' >/dev/null 2>&1 | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/with-locality-example/column-family \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"column_families": [ | ||
{ | ||
"name": "title" | ||
} | ||
], | ||
"locality_group": true | ||
}' >/dev/null 2>&1 | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/with-locality-example/write \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"items": [ | ||
{ | ||
"row_key": "org.apache.spark", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Spark™ - Unified Engine for large-scale data analytics" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.solr", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Welcome to Apache Solr - Apache Solr" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.hbase", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache HBase - Apache HBase™ Home" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.lucene", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Lucene - Welcome to Apache Lucene" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.kafka", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Kafka" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.cassandra", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Cassandra | Apache Cassandra Documentation" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.parquet", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Parquet" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
}, | ||
{ | ||
"row_key": "org.apache.arrow", | ||
"cells": [ | ||
{ | ||
"column_key": "title:", | ||
"type": "string", | ||
"value": "Apache Arrow | Apache Arrow" | ||
}, | ||
{ | ||
"column_key": "language:", | ||
"type": "string", | ||
"value": "EN" | ||
} | ||
] | ||
} | ||
] | ||
}' >/dev/null 2>&1 | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/with-locality-example/scan \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"row": { | ||
"prefix": "" | ||
}, | ||
"column": { | ||
"key": "title:" | ||
} | ||
}' 2>/dev/null | jq | ||
|
||
curl --request POST \ | ||
--url http://localhost:9876/v1/table/with-locality-example/scan \ | ||
--header 'content-type: application/json' \ | ||
--data '{ | ||
"row": { | ||
"prefix": "" | ||
}, | ||
"column": { | ||
"key": "language:" | ||
} | ||
}' 2>/dev/null | jq | ||
|
||
curl --request DELETE \ | ||
--url http://localhost:9876/v1/table/with-locality-example >/dev/null 2>&1 |
Oops, something went wrong.