From 4c1be874abfbce70cf590b734382a955d08227d5 Mon Sep 17 00:00:00 2001 From: "KIRSTEN W. HILDRUM" Date: Thu, 5 Feb 2015 17:24:45 -0500 Subject: [PATCH] Add examples to HBASEPut --- .../src/com/ibm/streamsx/hbase/HBASEPut.java | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/com.ibm.streamsx.hbase/impl/java/src/com/ibm/streamsx/hbase/HBASEPut.java b/com.ibm.streamsx.hbase/impl/java/src/com/ibm/streamsx/hbase/HBASEPut.java index dc59978..6589f08 100644 --- a/com.ibm.streamsx.hbase/impl/java/src/com/ibm/streamsx/hbase/HBASEPut.java +++ b/com.ibm.streamsx.hbase/impl/java/src/com/ibm/streamsx/hbase/HBASEPut.java @@ -53,9 +53,37 @@ + " and " + HBASEOperator.STATIC_COLQ_NAME + " parameters. " - + "All of the attribute values must have the following data type: rstring. " + + HBASEOperator.DOC_BLANKLINE + + "Here is an example: \\n" ++" () as allSink = HBASEPut(full)\\n" ++" {\\n" ++" param\\n" ++" tableName : \\\"streamsSample_lotr\\\" ;\\n" ++" rowAttrName : \\\"character\\\" ;\\n" ++" columnFamilyAttrName : \\\"colF\\\" ;\\n" ++" columnQualifierAttrName : \\\"colQ\\\" ;\\n" ++" valueAttrName : \\\"value\\\" ;\\n" ++" }\\n" + + "If the value is a tuple type, then the attribute names of the tuple are interpreted as the columnQualifiers " - + " for the correponding values. See the PutRecord sample application for an example." + + " for the correponding values. Here is an snippet from the PutRecord sample application." ++" We create the toHBASE stream: \\n" ++" stream bookData> toHBASE =\\n" ++" Functor(bookStream)\\n" ++" {\\n" ++" //// ...\\n" ++" }\\n" ++" Then we can use HBASEPut as follows:\\n" ++" () as putsink = HBASEPut(toHBASE)\\n" ++" {\\n" ++" param\\n" ++" rowAttrName : \\\"key\\\" ;\\n" ++" tableName : \\\"streamsSample_books\\\" ;\\n" ++" staticColumnFamily : \\\"all\\\" ;\\n" ++" valueAttrName : \\\"bookData\\\" ;\\n" ++" }\\n" ++HBASEOperator.DOC_BLANKLINE + "To support locking, HBASE supports a conditional put operation. This operator supports that operation " + "by using the " + HBASEPutDelete.CHECK_ATTR_PARAM