protected AbstractDemo() { cluster = CouchbaseCluster.create(ENV, COUCHBASE_IP); try { bucket = cluster.openBucket(BUCKET, PASSWORD); demo(); } finally { cluster.disconnect(); } }
public static void main(String[] args) { Cluster cluster = CouchbaseCluster.create("10.242.182.84", "10.242.182.246", "10.242.183.228"); Bucket bucket = cluster.openBucket("inventory_transactions", "password"); long start = 0; String id = "__flush_marker_1121"; // String id = "docId"; docCleanup(bucket, start); // singleDocCleanup( bucket, id ); // entireBucketFlush( bucket ); // flushCleanup( bucket, start ); System.out.println("Cleaned."); }
public static Bucket connectionCouchBaseLocal() { // 连接指定的桶 return cluster2.openBucket("zwh_court", 1, TimeUnit.MINUTES); }
@AfterClass public static void teardown() { cluster.disconnect(); }
@BeforeClass public static void setup() { cluster = CouchbaseCluster.create(); bucket = cluster.openBucket(); }