Skip to content

Commit

Permalink
Add examples to HBASEPut
Browse files Browse the repository at this point in the history
  • Loading branch information
KIRSTEN W. HILDRUM committed Feb 5, 2015
1 parent e8d7c9c commit 4c1be87
Showing 1 changed file with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<rstring key, tuple<rstring title, rstring author_fname,\\n"
+" rstring author_lname, rstring year, rstring rating> 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
Expand Down

0 comments on commit 4c1be87

Please sign in to comment.