The workshop is located in Github:
Clone the repository, or download the zip file.
All the instructions, and pre-requisites are located in the Read me
//... | |
Object o = cb.get("query-result-001"); | |
if (o == null) { | |
View view = cb.getView("brewery", "by_name"); | |
Query query = new Query(); | |
query.setLimit(100); | |
Map<String, String> result = new HashMap<String,String>(); | |
ViewResponse viewResponse = cb.query(view, query); | |
for (ViewRow row : viewResponse) { | |
result.put(row.getId(), row.getKey()); |
from couchbase import Couchbase | |
cb = Couchbase.connect(bucket='beer-sample') | |
hasRow = True | |
rowPerPage = 5 | |
page = 0 | |
currentStartkey="" | |
startDocId="" | |
while hasRow : |
from couchbase import Couchbase | |
cb = Couchbase.connect(bucket='beer-sample') | |
hasRow = True | |
rowPerPage = 5 | |
page = 0 | |
currentStartkey="" | |
startDocId="" |
package com.couchbase.devday; | |
import com.couchbase.client.CouchbaseClient; | |
import java.net.URI; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Properties; | |
import java.util.concurrent.TimeUnit; | |
import java.util.logging.ConsoleHandler; |
package com.couchbase.devday; | |
import com.couchbase.client.CouchbaseClient; | |
import net.spy.memcached.internal.OperationFuture; | |
import java.net.URI; | |
import java.util.ArrayList; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.UUID; |
package com.couchbase.devday; | |
import com.couchbase.client.CouchbaseClient; | |
import com.couchbase.client.protocol.views.*; | |
import java.net.URI; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Properties; | |
import java.util.concurrent.TimeUnit; |
The workshop is located in Github:
Clone the repository, or download the zip file.
All the instructions, and pre-requisites are located in the Read me
Lab 1
select customer_id from dfs.root.`/user/mapr/product_sales` where customer_id=1288034;
Open another terminal and create the following indices
maprcli table index add -path /user/mapr/product_sales -index index_customer_id -indexedfields '"customer_id"'
maprcli table index list -path /user/mapr/product_sales -json
//with a previously create client | |
client.set('some-key','42',function(err) { | |
if (err) { | |
throw err; /* in production, handle errors more gracefully */ | |
} else { | |
client.get('some-key',function(err,value) { | |
if (err) { | |
throw err; | |
} else { |
import time | |
import json | |
import requests | |
import re | |
import sys | |
# Read log | |
def tail(f): | |
f.seek(0, 2) | |
while True: |