Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sqoop import --connect jdbc:mysql://host:port/message
- --username message --password message
- --query "select 't0_'+ message_id as message_key, some_split_id, some_other_columns
- from message_0 where message_id >30000 and message_id <= 31000 and $CONDITIONS"
- --split-by some_split_id --hbase-row-key message_key
- --hbase-table message --column-family cf1
- public void set_message_key(String message_key) {
- this.message_key = "t0_" + message_key;
- }
- public MessageImporter with_message_key(String message_key) {
- this.message_key = "t0_" + message_key;
- return this;
- }
- ...
- public void readFields(DataInput __dataIn) throws IOException {
- if (__dataIn.readBoolean()) {
- this.message_key = null;
- } else {
- this.message_key = "t0_" + Text.readString(__dataIn);
- }
- ...
- ...
- }
- ...
- private void __loadFromFields(List<String> fields) {
- Iterator<String> __it = fields.listIterator();
- String __cur_str;
- __cur_str = __it.next();
- if (__cur_str.equals("null") || __cur_str.length() == 0) { this.message_key = null; } else {
- this.message_key = "t0_" + __cur_str;
- }
- ...
- }
- ...
- public void setField(String __fieldName, Object __fieldVal) {
- if ("message_key".equals(__fieldName)) {
- this.message_key = "t0_" + (String) __fieldVal;
- }
- ...
- }
- --jar-file someJar.jar --class-name com.foo.SomeImportClass
Add Comment
Please, Sign In to add comment