-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from hildrum/master
No comments, so I'm pulling this in.
- Loading branch information
Showing
5 changed files
with
135 additions
and
1 deletion.
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
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,11 @@ | ||
##License | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this except in compliance with the License. | ||
|
||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
|
||
See the License for the specific language governing permissions and limitations under the License. |
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,29 @@ | ||
# Copyright (C) 2014, International Business Machines Corporation | ||
# All Rights Reserved | ||
|
||
# NOTE: To compile, you must have HBASE_HOME and HBASE_HOME set in your | ||
# environment. | ||
|
||
.PHONY: all clean | ||
|
||
# Fill in STREAMS_HBASE_TOOLKIT location here. | ||
STREAMS_HBASE_TOOLKIT ?= ../../com.ibm.streamsx.hbase | ||
|
||
SPLC_FLAGS = -a | ||
SPLC = $(STREAMS_INSTALL)/bin/sc | ||
|
||
SPL_CMD_ARGS ?= -t $(STREAMS_HBASE_TOOLKIT) | ||
SPL_MAIN_COMPOSITE = com.ibm.streamsx.hbase.sample::ConfigTest | ||
|
||
all: standalone | ||
|
||
standalone: | ||
$(SPLC) $(SPLC_FLAGS) -T -M $(SPL_MAIN_COMPOSITE) $(SPL_CMD_ARGS) | ||
|
||
distributed: | ||
$(SPLC) $(SPLC_FLAGS) -M $(SPL_MAIN_COMPOSITE) $(SPL_CMD_ARGS) | ||
|
||
clean: | ||
$(SPLC) $(SPLC_FLAGS) -C -M $(SPL_MAIN_COMPOSITE) | ||
rm data/*.out | ||
|
43 changes: 43 additions & 0 deletions
43
samples/ConfigTests/com.ibm.streamsx.hbase.sample/ConfigTest.spl
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,43 @@ | ||
/* Copyright (C) 2013-2014, International Business Machines Corporation */ | ||
/* All Rights Reserved */ | ||
|
||
namespace com.ibm.streamsx.hbase.sample ; | ||
|
||
use com.ibm.streamsx.hbase::HBASEPut ; | ||
|
||
/** Demonstrate the use of configuration options. | ||
* To use, you must set hbaseSite when you run the standalone or submit the job. | ||
* Invoke the standalone with output/bin/standalone hbaseSite=/path/to/hbase-site.xml | ||
* Submit the job with -P hbaseSite=/path/to/hbase-site.xml | ||
* The path may be relative or absolute; if relative, it's relative to teh data | ||
* directory. | ||
*/ | ||
|
||
composite ConfigTest | ||
{ | ||
// You must supply this to run the composite. | ||
param expression<rstring> $hbaseSite: getSubmissionTimeValue("hbaseSite"); | ||
graph | ||
stream<rstring character, rstring colF, rstring colQ, rstring value> full = Beacon() { | ||
param | ||
iterations: 1; | ||
output full: | ||
character = "Bill", | ||
colF="appearance", | ||
colQ="numlegs", | ||
value="4"; | ||
} | ||
|
||
() as allSink = HBASEPut(full) | ||
{ | ||
param | ||
tableName : "streamsSample_lotr" ; | ||
rowAttrName : "character" ; | ||
columnFamilyAttrName : "colF" ; | ||
columnQualifierAttrName : "colQ" ; | ||
valueAttrName : "value" ; | ||
hbaseSite: $hbaseSite; | ||
} | ||
|
||
} | ||
|
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,27 @@ | ||
# Tests the GetSample and Scan sample | ||
# | ||
|
||
CLEAR_TABLE | ||
tableName=streamsSample_lotr | ||
firstColumnFamily=appearance | ||
secondColumnFamily=location | ||
|
||
COMMAND | ||
command=echo $HBASE_HOME/conf/hbase-site.xml | ||
resultKey=absPath | ||
|
||
MAKE_AND_RUN | ||
dir=../samples/ConfigTests | ||
param1=hbaseSite | ||
value1_key=absPath | ||
|
||
COMMAND | ||
command=cp $HBASE_HOME/conf/hbase-site.xml ../samples/ConfigTests/data | ||
|
||
MAKE_AND_RUN | ||
dir=../samples/ConfigTests | ||
param1=hbaseSite | ||
value1=hbase-site.xml | ||
|
||
|
||
# leave empty line. |