I am having a command having a length greater than 255. The command is a Sqoop (Hadoop) import which loads data into the hive from a RDBMS. I am using the ProcessBuilder API which provide two constructors
ProcessBuilder(String[] command)
ProcessBuilder(List<String> command)
I tried passing the command in both the ways as mentioned above
ssh hddev-chost-01-01 "sqoop import -D oraoop.disabled=true -D mapred.child.java.opts='\-Djava.security.egd=file:/dev/../dev/urandom' --connect 'jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=maildude.com)(PORT=1533))(CONNECT_DATA=(SERVICE_NAME=SDA.COM)(Server=Dedicated)))' --username user --password pass --query \"select INVENTORY_ITEM_ID,ORGANIZATION_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,SUMMARY_FLAG,ENABLED_FLAG,START_DATE_ACTIVE,END_DATE_ACTIVE,DESCRIPTION,BUYER_ID,ACCOUNTING_RULE_ID,INVOICING_RULE_ID,SEGMENT1,SEGMENT2,SEGMENT3,SEGMENT4,SEGMENT5,SEGMENT6,SEGMENT7,SEGMENT8,SEGMENT9,SEGMENT10,SEGMENT11,SEGMENT12,SEGMENT13,SEGMENT14,SEGMENT15,SEGMENT16,SEGMENT17,SEGMENT18,SEGMENT19,SEGMENT20,ATTRIBUTE_CATEGORY,ATTRIBUTE1,ATTRIBUTE2,ATTRIBUTE3,ATTRIBUTE4,ATTRIBUTE5,ATTRIBUTE6,ATTRIBUTE7,ATTRIBUTE8,ATTRIBUTE9,ATTRIBUTE10,ATTRIBUTE11,ATTRIBUTE12,ATTRIBUTE13,ATTRIBUTE14,ATTRIBUTE15,PURCHASING_ITEM_FLAG,SHIPPABLE_ITEM_FLAG,CUSTOMER_ORDER_FLAG,INTERNAL_ORDER_FLAG,SERVICE_ITEM_FLAG,INVENTORY_ITEM_FLAG,ENG_ITEM_FLAG,INVENTORY_ASSET_FLAG,PURCHASING_ENABLED_FLAG,CUSTOMER_ORDER_ENABLED_FLAG,INTERNAL_ORDER_ENABLED_FLAG,SO_TRANSACTIONS_FLAG,MTL_TRANSACTIONS_ENABLED_FLAG,STOCK_ENABLED_FLAG,BOM_ENABLED_FLAG,BUILD_IN_WIP_FLAG,REVISION_QTY_CONTROL_CODE,ITEM_CATALOG_GROUP_ID,CATALOG_STATUS_FLAG,RETURNABLE_FLAG,DEFAULT_SHIPPING_ORG,COLLATERAL_FLAG,TAXABLE_FLAG,QTY_RCV_EXCEPTION_CODE,ALLOW_ITEM_DESC_UPDATE_FLAG,INSPECTION_REQUIRED_FLAG,RECEIPT_REQUIRED_FLAG,MARKET_PRICE,HAZARD_CLASS_ID,RFQ_REQUIRED_FLAG,QTY_RCV_TOLERANCE,LIST_PRICE_PER_UNIT,UN_NUMBER_ID,PRICE_TOLERANCE_PERCENT,ASSET_CATEGORY_ID,ROUNDING_FACTOR,UNIT_OF_ISSUE,ENFORCE_SHIP_TO_LOCATION_CODE,ALLOW_SUBSTITUTE_RECEIPTS_FLAG,ALLOW_UNORDERED_RECEIPTS_FLAG,ALLOW_EXPRESS_DELIVERY_FLAG,DAYS_EARLY_RECEIPT_ALLOWED,DAYS_LATE_RECEIPT_ALLOWED,RECEIPT_DAYS_EXCEPTION_CODE,RECEIVING_ROUTING_ID,INVOICE_CLOSE_TOLERANCE,RECEIVE_CLOSE_TOLERANCE,AUTO_LOT_ALPHA_PREFIX,START_AUTO_LOT_NUMBER,LOT_CONTROL_CODE,SHELF_LIFE_CODE,SHELF_LIFE_DAYS,SERIAL_NUMBER_CONTROL_CODE,START_AUTO_SERIAL_NUMBER,AUTO_SERIAL_ALPHA_PREFIX,SOURCE_TYPE,SOURCE_ORGANIZATION_ID,SOURCE_SUBINVENTORY,EXPENSE_ACCOUNT,ENCUMBRANCE_ACCOUNT,RESTRICT_SUBINVENTORIES_CODE,UNIT_WEIGHT,WEIGHT_UOM_CODE,VOLUME_UOM_CODE,UNIT_VOLUME,RESTRICT_LOCATORS_CODE,LOCATION_CONTROL_CODE,SHRINKAGE_RATE,ACCEPTABLE_EARLY_DAYS,PLANNING_TIME_FENCE_CODE,DEMAND_TIME_FENCE_CODE,LEAD_TIME_LOT_SIZE,STD_LOT_SIZE,CUM_MANUFACTURING_LEAD_TIME,OVERRUN_PERCENTAGE,MRP_CALCULATE_ATP_FLAG,ACCEPTABLE_RATE_INCREASE,ACCEPTABLE_RATE_DECREASE,CUMULATIVE_TOTAL_LEAD_TIME,PLANNING_TIME_FENCE_DAYS,DEMAND_TIME_FENCE_DAYS,END_ASSEMBLY_PEGGING_FLAG,REPETITIVE_PLANNING_FLAG,PLANNING_EXCEPTION_SET,BOM_ITEM_TYPE,PICK_COMPONENTS_FLAG,REPLENISH_TO_ORDER_FLAG,BASE_ITEM_ID,ATP_COMPONENTS_FLAG,ATP_FLAG,FIXED_LEAD_TIME,VARIABLE_LEAD_TIME,WIP_SUPPLY_LOCATOR_ID,WIP_SUPPLY_TYPE,WIP_SUPPLY_SUBINVENTORY,PRIMARY_UOM_CODE,PRIMARY_UNIT_OF_MEASURE,ALLOWED_UNITS_LOOKUP_CODE,COST_OF_SALES_ACCOUNT,SALES_ACCOUNT,DEFAULT_INCLUDE_IN_ROLLUP_FLAG,INVENTORY_ITEM_STATUS_CODE,INVENTORY_PLANNING_CODE,PLANNER_CODE,PLANNING_MAKE_BUY_CODE,FIXED_LOT_MULTIPLIER,ROUNDING_CONTROL_TYPE,CARRYING_COST,POSTPROCESSING_LEAD_TIME,PREPROCESSING_LEAD_TIME,FULL_LEAD_TIME,ORDER_COST,MRP_SAFETY_STOCK_PERCENT,MRP_SAFETY_STOCK_CODE,MIN_MINMAX_QUANTITY,MAX_MINMAX_QUANTITY,MINIMUM_ORDER_QUANTITY,FIXED_ORDER_QUANTITY,FIXED_DAYS_SUPPLY,MAXIMUM_ORDER_QUANTITY,ATP_RULE_ID,PICKING_RULE_ID,RESERVABLE_TYPE,POSITIVE_MEASUREMENT_ERROR,NEGATIVE_MEASUREMENT_ERROR,ENGINEERING_ECN_CODE,ENGINEERING_ITEM_ID,ENGINEERING_DATE,SERVICE_STARTING_DELAY,VENDOR_WARRANTY_FLAG,SERVICEABLE_COMPONENT_FLAG,SERVICEABLE_PRODUCT_FLAG,BASE_WARRANTY_SERVICE_ID,PAYMENT_TERMS_ID,PREVENTIVE_MAINTENANCE_FLAG,PRIMARY_SPECIALIST_ID,SECONDARY_SPECIALIST_ID,SERVICEABLE_ITEM_CLASS_ID,TIME_BILLABLE_FLAG,MATERIAL_BILLABLE_FLAG,EXPENSE_BILLABLE_FLAG,PRORATE_SERVICE_FLAG,COVERAGE_SCHEDULE_ID,SERVICE_DURATION_PERIOD_CODE,SERVICE_DURATION,WARRANTY_VENDOR_ID,MAX_WARRANTY_AMOUNT,RESPONSE_TIME_PERIOD_CODE,RESPONSE_TIME_VALUE,NEW_REVISION_CODE,INVOICEABLE_ITEM_FLAG,TAX_CODE,INVOICE_ENABLED_FLAG,MUST_USE_APPROVED_VENDOR_FLAG,REQUEST_ID,PROGRAM_APPLICATION_ID,PROGRAM_ID,PROGRAM_UPDATE_DATE,OUTSIDE_OPERATION_FLAG,OUTSIDE_OPERATION_UOM_TYPE,SAFETY_STOCK_BUCKET_DAYS,AUTO_REDUCE_MPS,COSTING_ENABLED_FLAG,AUTO_CREATED_CONFIG_FLAG,CYCLE_COUNT_ENABLED_FLAG,ITEM_TYPE,MODEL_CONFIG_CLAUSE_NAME,SHIP_MODEL_COMPLETE_FLAG,MRP_PLANNING_CODE,RETURN_INSPECTION_REQUIREMENT,ATO_FORECAST_CONTROL,RELEASE_TIME_FENCE_CODE,RELEASE_TIME_FENCE_DAYS,CONTAINER_ITEM_FLAG,VEHICLE_ITEM_FLAG,MAXIMUM_LOAD_WEIGHT,MINIMUM_FILL_PERCENT,CONTAINER_TYPE_CODE,INTERNAL_VOLUME,WH_UPDATE_DATE,PRODUCT_FAMILY_ITEM_ID,GLOBAL_ATTRIBUTE_CATEGORY,GLOBAL_ATTRIBUTE1,GLOBAL_ATTRIBUTE2,GLOBAL_ATTRIBUTE3,GLOBAL_ATTRIBUTE4,GLOBAL_ATTRIBUTE5,GLOBAL_ATTRIBUTE6,GLOBAL_ATTRIBUTE7,GLOBAL_ATTRIBUTE8,GLOBAL_ATTRIBUTE9,GLOBAL_ATTRIBUTE10,PURCHASING_TAX_CODE,OVERCOMPLETION_TOLERANCE_TYPE,OVERCOMPLETION_TOLERANCE_VALUE,EFFECTIVITY_CONTROL,CHECK_SHORTAGES_FLAG,OVER_SHIPMENT_TOLERANCE,UNDER_SHIPMENT_TOLERANCE,OVER_RETURN_TOLERANCE,UNDER_RETURN_TOLERANCE,EQUIPMENT_TYPE,RECOVERED_PART_DISP_CODE,DEFECT_TRACKING_ON_FLAG,USAGE_ITEM_FLAG,EVENT_FLAG,ELECTRONIC_FLAG,DOWNLOADABLE_FLAG,VOL_DISCOUNT_EXEMPT_FLAG,COUPON_EXEMPT_FLAG,COMMS_NL_TRACKABLE_FLAG,ASSET_CREATION_CODE,COMMS_ACTIVATION_REQD_FLAG,ORDERABLE_ON_WEB_FLAG,BACK_ORDERABLE_FLAG,WEB_STATUS,INDIVISIBLE_FLAG,DIMENSION_UOM_CODE,UNIT_LENGTH,UNIT_WIDTH,UNIT_HEIGHT,BULK_PICKED_FLAG,LOT_STATUS_ENABLED,DEFAULT_LOT_STATUS_ID,SERIAL_STATUS_ENABLED,DEFAULT_SERIAL_STATUS_ID,LOT_SPLIT_ENABLED,LOT_MERGE_ENABLED,INVENTORY_CARRY_PENALTY,OPERATION_SLACK_PENALTY,FINANCING_ALLOWED_FLAG,EAM_ITEM_TYPE,EAM_ACTIVITY_TYPE_CODE,EAM_ACTIVITY_CAUSE_CODE,EAM_ACT_NOTIFICATION_FLAG,EAM_ACT_SHUTDOWN_STATUS,DUAL_UOM_CONTROL,SECONDARY_UOM_CODE,DUAL_UOM_DEVIATION_HIGH,DUAL_UOM_DEVIATION_LOW,CONTRACT_ITEM_TYPE_CODE,SUBSCRIPTION_DEPEND_FLAG,SERV_REQ_ENABLED_CODE,SERV_BILLING_ENABLED_FLAG,SERV_IMPORTANCE_LEVEL,PLANNED_INV_POINT_FLAG,LOT_TRANSLATE_ENABLED,DEFAULT_SO_SOURCE_TYPE,CREATE_SUPPLY_FLAG,SUBSTITUTION_WINDOW_CODE,SUBSTITUTION_WINDOW_DAYS,IB_ITEM_INSTANCE_CLASS,CONFIG_MODEL_TYPE,LOT_SUBSTITUTION_ENABLED,MINIMUM_LICENSE_QUANTITY,EAM_ACTIVITY_SOURCE_CODE,LIFECYCLE_ID,CURRENT_PHASE_ID,OBJECT_VERSION_NUMBER,CDB_DATA_SOURCE,CDB_ENQUEUE_TIME,CDB_DEQUEUE_TIME,CDB_ENQUEUE_SEQ from MTL_SYSTEM_ITEMS_B where \\\$CONDITIONS \" --target-dir /app/dev/SmartAnalytics/sqoop_temp//MTL_SYSTEM_ITEMS_B -m 4 --split-by INVENTORY_ITEM_ID --hive-import --hive-overwrite --hive-table installbase.MTL_SYSTEM_ITEMS_B --null-string '\\\\N' --null-non-string '\\\\N' --hive-delims-replacement '<EOL>' --map-column-hive INVENTORY_ITEM_ID=BIGINT,ORGANIZATION_ID=BIGINT,LAST_UPDATE_DATE=TIMESTAMP,LAST_UPDATED_BY=BIGINT,CREATION_DATE=TIMESTAMP,CREATED_BY=BIGINT,LAST_UPDATE_LOGIN=BIGINT,SUMMARY_FLAG=STRING,ENABLED_FLAG=STRING,START_DATE_ACTIVE=TIMESTAMP,END_DATE_ACTIVE=TIMESTAMP,DESCRIPTION=STRING,BUYER_ID=BIGINT,ACCOUNTING_RULE_ID=BIGINT,INVOICING_RULE_ID=BIGINT,SEGMENT1=STRING,SEGMENT2=STRING,SEGMENT3=STRING,SEGMENT4=STRING,SEGMENT5=STRING,SEGMENT6=STRING,SEGMENT7=STRING,SEGMENT8=STRING,SEGMENT9=STRING,SEGMENT10=STRING,SEGMENT11=STRING,SEGMENT12=STRING,SEGMENT13=STRING,SEGMENT14=STRING,SEGMENT15=STRING,SEGMENT16=STRING,SEGMENT17=STRING,SEGMENT18=STRING,SEGMENT19=STRING,SEGMENT20=STRING,ATTRIBUTE_CATEGORY=STRING,ATTRIBUTE1=STRING,ATTRIBUTE2=STRING,ATTRIBUTE3=STRING,ATTRIBUTE4=STRING,ATTRIBUTE5=STRING,ATTRIBUTE6=STRING,ATTRIBUTE7=STRING,ATTRIBUTE8=STRING,ATTRIBUTE9=STRING,ATTRIBUTE10=STRING,ATTRIBUTE11=STRING,ATTRIBUTE12=STRING,ATTRIBUTE13=STRING,ATTRIBUTE14=STRING,ATTRIBUTE15=STRING,PURCHASING_ITEM_FLAG=STRING,SHIPPABLE_ITEM_FLAG=STRING,CUSTOMER_ORDER_FLAG=STRING,INTERNAL_ORDER_FLAG=STRING,SERVICE_ITEM_FLAG=STRING,INVENTORY_ITEM_FLAG=STRING,ENG_ITEM_FLAG=STRING,INVENTORY_ASSET_FLAG=STRING,PURCHASING_ENABLED_FLAG=STRING,CUSTOMER_ORDER_ENABLED_FLAG=STRING,INTERNAL_ORDER_ENABLED_FLAG=STRING,SO_TRANSACTIONS_FLAG=STRING,MTL_TRANSACTIONS_ENABLED_FLAG=STRING,STOCK_ENABLED_FLAG=STRING,BOM_ENABLED_FLAG=STRING,BUILD_IN_WIP_FLAG=STRING,REVISION_QTY_CONTROL_CODE=BIGINT,ITEM_CATALOG_GROUP_ID=BIGINT,CATALOG_STATUS_FLAG=STRING,RETURNABLE_FLAG=STRING,DEFAULT_SHIPPING_ORG=BIGINT,COLLATERAL_FLAG=STRING,TAXABLE_FLAG=STRING,QTY_RCV_EXCEPTION_CODE=STRING,ALLOW_ITEM_DESC_UPDATE_FLAG=STRING,INSPECTION_REQUIRED_FLAG=STRING,RECEIPT_REQUIRED_FLAG=STRING,MARKET_PRICE=BIGINT,HAZARD_CLASS_ID=BIGINT,RFQ_REQUIRED_FLAG=STRING,QTY_RCV_TOLERANCE=BIGINT,LIST_PRICE_PER_UNIT=BIGINT,UN_NUMBER_ID=BIGINT,PRICE_TOLERANCE_PERCENT=BIGINT,ASSET_CATEGORY_ID=BIGINT,ROUNDING_FACTOR=BIGINT,UNIT_OF_ISSUE=STRING,ENFORCE_SHIP_TO_LOCATION_CODE=STRING,ALLOW_SUBSTITUTE_RECEIPTS_FLAG=STRING,ALLOW_UNORDERED_RECEIPTS_FLAG=STRING,ALLOW_EXPRESS_DELIVERY_FLAG=STRING,DAYS_EARLY_RECEIPT_ALLOWED=BIGINT,DAYS_LATE_RECEIPT_ALLOWED=BIGINT,RECEIPT_DAYS_EXCEPTION_CODE=STRING,RECEIVING_ROUTING_ID=BIGINT,INVOICE_CLOSE_TOLERANCE=BIGINT,RECEIVE_CLOSE_TOLERANCE=BIGINT,AUTO_LOT_ALPHA_PREFIX=STRING,START_AUTO_LOT_NUMBER=STRING,LOT_CONTROL_CODE=BIGINT,SHELF_LIFE_CODE=BIGINT,SHELF_LIFE_DAYS=BIGINT,SERIAL_NUMBER_CONTROL_CODE=BIGINT,START_AUTO_SERIAL_NUMBER=STRING,AUTO_SERIAL_ALPHA_PREFIX=STRING,SOURCE_TYPE=BIGINT,SOURCE_ORGANIZATION_ID=BIGINT,SOURCE_SUBINVENTORY=STRING,EXPENSE_ACCOUNT=BIGINT,ENCUMBRANCE_ACCOUNT=BIGINT,RESTRICT_SUBINVENTORIES_CODE=BIGINT,UNIT_WEIGHT=BIGINT,WEIGHT_UOM_CODE=STRING,VOLUME_UOM_CODE=STRING,UNIT_VOLUME=BIGINT,RESTRICT_LOCATORS_CODE=BIGINT,LOCATION_CONTROL_CODE=BIGINT,SHRINKAGE_RATE=BIGINT,ACCEPTABLE_EARLY_DAYS=BIGINT,PLANNING_TIME_FENCE_CODE=BIGINT,DEMAND_TIME_FENCE_CODE=BIGINT,LEAD_TIME_LOT_SIZE=BIGINT,STD_LOT_SIZE=BIGINT,CUM_MANUFACTURING_LEAD_TIME=BIGINT,OVERRUN_PERCENTAGE=BIGINT,MRP_CALCULATE_ATP_FLAG=STRING,ACCEPTABLE_RATE_INCREASE=BIGINT,ACCEPTABLE_RATE_DECREASE=BIGINT,CUMULATIVE_TOTAL_LEAD_TIME=BIGINT,PLANNING_TIME_FENCE_DAYS=BIGINT,DEMAND_TIME_FENCE_DAYS=BIGINT,END_ASSEMBLY_PEGGING_FLAG=STRING,REPETITIVE_PLANNING_FLAG=STRING,PLANNING_EXCEPTION_SET=STRING,BOM_ITEM_TYPE=BIGINT,PICK_COMPONENTS_FLAG=STRING,REPLENISH_TO_ORDER_FLAG=STRING,BASE_ITEM_ID=BIGINT,ATP_COMPONENTS_FLAG=STRING,ATP_FLAG=STRING,FIXED_LEAD_TIME=BIGINT,VARIABLE_LEAD_TIME=BIGINT,WIP_SUPPLY_LOCATOR_ID=BIGINT,WIP_SUPPLY_TYPE=BIGINT,WIP_SUPPLY_SUBINVENTORY=STRING,PRIMARY_UOM_CODE=STRING,PRIMARY_UNIT_OF_MEASURE=STRING,ALLOWED_UNITS_LOOKUP_CODE=BIGINT,COST_OF_SALES_ACCOUNT=BIGINT,SALES_ACCOUNT=BIGINT,DEFAULT_INCLUDE_IN_ROLLUP_FLAG=STRING,INVENTORY_ITEM_STATUS_CODE=STRING,INVENTORY_PLANNING_CODE=BIGINT,PLANNER_CODE=STRING,PLANNING_MAKE_BUY_CODE=BIGINT,FIXED_LOT_MULTIPLIER=BIGINT,ROUNDING_CONTROL_TYPE=BIGINT,CARRYING_COST=BIGINT,POSTPROCESSING_LEAD_TIME=BIGINT,PREPROCESSING_LEAD_TIME=BIGINT,FULL_LEAD_TIME=BIGINT,ORDER_COST=BIGINT,MRP_SAFETY_STOCK_PERCENT=BIGINT,MRP_SAFETY_STOCK_CODE=BIGINT,MIN_MINMAX_QUANTITY=BIGINT,MAX_MINMAX_QUANTITY=BIGINT,MINIMUM_ORDER_QUANTITY=BIGINT,FIXED_ORDER_QUANTITY=BIGINT,FIXED_DAYS_SUPPLY=BIGINT,MAXIMUM_ORDER_QUANTITY=BIGINT,ATP_RULE_ID=BIGINT,PICKING_RULE_ID=BIGINT,RESERVABLE_TYPE=BIGINT,POSITIVE_MEASUREMENT_ERROR=BIGINT,NEGATIVE_MEASUREMENT_ERROR=BIGINT,ENGINEERING_ECN_CODE=STRING,ENGINEERING_ITEM_ID=BIGINT,ENGINEERING_DATE=TIMESTAMP,SERVICE_STARTING_DELAY=BIGINT,VENDOR_WARRANTY_FLAG=STRING,SERVICEABLE_COMPONENT_FLAG=STRING,SERVICEABLE_PRODUCT_FLAG=STRING,BASE_WARRANTY_SERVICE_ID=BIGINT,PAYMENT_TERMS_ID=BIGINT,PREVENTIVE_MAINTENANCE_FLAG=STRING,PRIMARY_SPECIALIST_ID=BIGINT,SECONDARY_SPECIALIST_ID=BIGINT,SERVICEABLE_ITEM_CLASS_ID=BIGINT,TIME_BILLABLE_FLAG=STRING,MATERIAL_BILLABLE_FLAG=STRING,EXPENSE_BILLABLE_FLAG=STRING,PRORATE_SERVICE_FLAG=STRING,COVERAGE_SCHEDULE_ID=BIGINT,SERVICE_DURATION_PERIOD_CODE=STRING,SERVICE_DURATION=BIGINT,WARRANTY_VENDOR_ID=BIGINT,MAX_WARRANTY_AMOUNT=BIGINT,RESPONSE_TIME_PERIOD_CODE=STRING,RESPONSE_TIME_VALUE=BIGINT,NEW_REVISION_CODE=STRING,INVOICEABLE_ITEM_FLAG=STRING,TAX_CODE=STRING,INVOICE_ENABLED_FLAG=STRING,MUST_USE_APPROVED_VENDOR_FLAG=STRING,REQUEST_ID=BIGINT,PROGRAM_APPLICATION_ID=BIGINT,PROGRAM_ID=BIGINT,PROGRAM_UPDATE_DATE=TIMESTAMP,OUTSIDE_OPERATION_FLAG=STRING,OUTSIDE_OPERATION_UOM_TYPE=STRING,SAFETY_STOCK_BUCKET_DAYS=BIGINT,AUTO_REDUCE_MPS=BIGINT,COSTING_ENABLED_FLAG=STRING,AUTO_CREATED_CONFIG_FLAG=STRING,CYCLE_COUNT_ENABLED_FLAG=STRING,ITEM_TYPE=STRING,MODEL_CONFIG_CLAUSE_NAME=STRING,SHIP_MODEL_COMPLETE_FLAG=STRING,MRP_PLANNING_CODE=BIGINT,RETURN_INSPECTION_REQUIREMENT=BIGINT,ATO_FORECAST_CONTROL=BIGINT,RELEASE_TIME_FENCE_CODE=BIGINT,RELEASE_TIME_FENCE_DAYS=BIGINT,CONTAINER_ITEM_FLAG=STRING,VEHICLE_ITEM_FLAG=STRING,MAXIMUM_LOAD_WEIGHT=BIGINT,MINIMUM_FILL_PERCENT=BIGINT,CONTAINER_TYPE_CODE=STRING,INTERNAL_VOLUME=BIGINT,WH_UPDATE_DATE=TIMESTAMP,PRODUCT_FAMILY_ITEM_ID=BIGINT,GLOBAL_ATTRIBUTE_CATEGORY=STRING,GLOBAL_ATTRIBUTE1=STRING,GLOBAL_ATTRIBUTE2=STRING,GLOBAL_ATTRIBUTE3=STRING,GLOBAL_ATTRIBUTE4=STRING,GLOBAL_ATTRIBUTE5=STRING,GLOBAL_ATTRIBUTE6=STRING,GLOBAL_ATTRIBUTE7=STRING,GLOBAL_ATTRIBUTE8=STRING,GLOBAL_ATTRIBUTE9=STRING,GLOBAL_ATTRIBUTE10=STRING,PURCHASING_TAX_CODE=STRING,OVERCOMPLETION_TOLERANCE_TYPE=BIGINT,OVERCOMPLETION_TOLERANCE_VALUE=BIGINT,EFFECTIVITY_CONTROL=BIGINT,CHECK_SHORTAGES_FLAG=STRING,OVER_SHIPMENT_TOLERANCE=BIGINT,UNDER_SHIPMENT_TOLERANCE=BIGINT,OVER_RETURN_TOLERANCE=BIGINT,UNDER_RETURN_TOLERANCE=BIGINT,EQUIPMENT_TYPE=BIGINT,RECOVERED_PART_DISP_CODE=STRING,DEFECT_TRACKING_ON_FLAG=STRING,USAGE_ITEM_FLAG=STRING,EVENT_FLAG=STRING,ELECTRONIC_FLAG=STRING,DOWNLOADABLE_FLAG=STRING,VOL_DISCOUNT_EXEMPT_FLAG=STRING,COUPON_EXEMPT_FLAG=STRING,COMMS_NL_TRACKABLE_FLAG=STRING,ASSET_CREATION_CODE=STRING,COMMS_ACTIVATION_REQD_FLAG=STRING,ORDERABLE_ON_WEB_FLAG=STRING,BACK_ORDERABLE_FLAG=STRING,WEB_STATUS=STRING,INDIVISIBLE_FLAG=STRING,DIMENSION_UOM_CODE=STRING,UNIT_LENGTH=BIGINT,UNIT_WIDTH=BIGINT,UNIT_HEIGHT=BIGINT,BULK_PICKED_FLAG=STRING,LOT_STATUS_ENABLED=STRING,DEFAULT_LOT_STATUS_ID=BIGINT,SERIAL_STATUS_ENABLED=STRING,DEFAULT_SERIAL_STATUS_ID=BIGINT,LOT_SPLIT_ENABLED=STRING,LOT_MERGE_ENABLED=STRING,INVENTORY_CARRY_PENALTY=BIGINT,OPERATION_SLACK_PENALTY=BIGINT,FINANCING_ALLOWED_FLAG=STRING,EAM_ITEM_TYPE=BIGINT,EAM_ACTIVITY_TYPE_CODE=STRING,EAM_ACTIVITY_CAUSE_CODE=STRING,EAM_ACT_NOTIFICATION_FLAG=STRING,EAM_ACT_SHUTDOWN_STATUS=STRING,DUAL_UOM_CONTROL=BIGINT,SECONDARY_UOM_CODE=STRING,DUAL_UOM_DEVIATION_HIGH=BIGINT,DUAL_UOM_DEVIATION_LOW=BIGINT,CONTRACT_ITEM_TYPE_CODE=STRING,SUBSCRIPTION_DEPEND_FLAG=STRING,SERV_REQ_ENABLED_CODE=STRING,SERV_BILLING_ENABLED_FLAG=STRING,SERV_IMPORTANCE_LEVEL=BIGINT,PLANNED_INV_POINT_FLAG=STRING,LOT_TRANSLATE_ENABLED=STRING,DEFAULT_SO_SOURCE_TYPE=STRING,CREATE_SUPPLY_FLAG=STRING,SUBSTITUTION_WINDOW_CODE=BIGINT,SUBSTITUTION_WINDOW_DAYS=BIGINT,IB_ITEM_INSTANCE_CLASS=STRING,CONFIG_MODEL_TYPE=STRING,LOT_SUBSTITUTION_ENABLED=STRING,MINIMUM_LICENSE_QUANTITY=BIGINT,EAM_ACTIVITY_SOURCE_CODE=STRING,LIFECYCLE_ID=BIGINT,CURRENT_PHASE_ID=BIGINT,OBJECT_VERSION_NUMBER=BIGINT,CDB_DATA_SOURCE=STRING,CDB_ENQUEUE_TIME=TIMESTAMP,CDB_DEQUEUE_TIME=TIMESTAMP,CDB_ENQUEUE_SEQ=BIGINT --boundary-query 'select (select min(INVENTORY_ITEM_ID) from MTL_SYSTEM_ITEMS_B) as minid ,(select max(INVENTORY_ITEM_ID) from MTL_SYSTEM_ITEMS_B) as maxid from dual' " >> /apps/pentaho_nfs/installbase/input/poc/logs/IB_logs.log 2>&1
But, the command fails executing with a syntax error as the command seems to be split at the select query which is not being identified by sqoop cli. Whereas, when i run the same command directly on the cli it works like a charm.
Here, is my java code which creates a string array from the command and passes it to the ProcessBuilder object.
public void run() {
ProcessBuilder processbuilder = new ProcessBuilder(command);
try {
Process process = processbuilder.inheritIO().start();
process.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String readline;
while ((readline = reader.readLine()) != null) {
LOGGER.info(readline);
}
} catch (Exception e) {
LOGGER.error(e.getMessage());
}
}
static String[] command = null;
static String SQOOP_XXCCS_DS_SAHDR_CORE = ReadProperties.getInstance().getProperty("SQOOP_XXCCS_DS_SAHDR_CORE");
static String SQOOP_XXCCS_DS_CVDPRDLINE_DETAIL = ReadProperties.getInstance()
.getProperty("SQOOP_XXCCS_DS_CVDPRDLINE_DETAIL");
static String SQOOP_XXCCS_DS_INSTANCE_DETAIL = ReadProperties.getInstance()
.getProperty("SQOOP_XXCCS_DS_INSTANCE_DETAIL");
static String SQOOP_XXCCS_SCDC_PRODUCT_PROFILE = ReadProperties.getInstance()
.getProperty("SQOOP_XXCCS_SCDC_PRODUCT_PROFILE");
static String SQOOP_MTL_SYSTEM_ITEMS_B = ReadProperties.getInstance().getProperty("SQOOP_MTL_SYSTEM_ITEMS_B");
public static void main(String[] args) {
ThreadPoolExecutor executors = (ThreadPoolExecutor) Executors.newFixedThreadPool(5);
List<String> getlist = getList();
for (Iterator<String> itr = getlist.iterator(); itr.hasNext();) {
String element = (String) itr.next();
LOGGER.info(element);
command = element.split(" ");
LOGGER.info("Executing the command as below \n");
LOGGER.info(command);
ParallelExecutor pe = new ParallelExecutor(command);
executors.execute(pe);
}
executors.shutdown();
}
public static List<String> getList() {
List<String> commandlist = new ArrayList<String>();
commandlist.add(SQOOP_XXCCS_DS_SAHDR_CORE);
commandlist.add(SQOOP_XXCCS_DS_CVDPRDLINE_DETAIL);
commandlist.add(SQOOP_XXCCS_DS_INSTANCE_DETAIL);
commandlist.add(SQOOP_XXCCS_SCDC_PRODUCT_PROFILE);
commandlist.add(SQOOP_MTL_SYSTEM_ITEMS_B);
return commandlist;
}
Is there an elegant way i can pass the command to the processbuilder avoiding the syntactical errors. Need your valuable suggestions.
Stack Trace 1:
log4j:WARN No appenders could be found for logger (com.cisco.parallelexecutor.ParallelExecutor).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.io.IOException: Cannot run program "ssh hddev-c01-edge-02 "sqoop import -D mapred.child.java.opts='-Djava.security.egd=file:/dev/../dev/urandom' --connect 'jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbs-dev-vm-2009.cisco.com)(PORT=1533))(CONNECT_DATA=(SERVICE_NAME=SDADEV.CISCO.COM)(Server=Dedicated)))' --username XXCTS_NITA_U --password OBCK9I2Q --query "select CONTRACT_ID,CONTRACT_NUMBER,CONTRACT_STS_CODE,CONTRACT_STATUS,SERVICE_LINE_ID,SERVICE_LINE_NAME,SERVICE_LINE_STS_CODE,SERVICE_LINE_STATUS,SERVICE_LINE_NUMBER,HDR_CUST_ACCOUNT_ID,HDR_CUST_ACCOUNT_NUMBER,HDR_PARTY_ID,HDR_CUSTOMER_NAME,LINE_CUST_ACCOUNT_ID,LINE_CUST_ACCOUNT_NUMBER,LINE_PARTY_ID,LINE_CUSTOMER_NAME,BILL_TO_SITE_USE_ID,BILL_TO_SITE_USE_NAME,BILL_TO_SITE_USE_STS,BILL_TO_CUST_ACCT_ID,BILL_TO_CUST_ACCT_NUMBER,BILL_TO_CUST_ACCT_STS,BILL_TO_CUST_ACCT_SITE_ID,BILL_TO_CUST_ACCT_SITE_STS,BILL_TO_PARTY_ID,BILL_TO_PARTY_NUMBER,BILL_TO_CUSTOMER_NAME,BILL_TO_PARTY_STS,BILL_TO_PARTY_SITE_ID,BILL_TO_PARTY_SITE_STS,BILL_TO_LOCATION_ID,BILL_TO_COUNTRY,BILL_TO_STATE_PROV,BILL_TO_CITY,BILL_TO_POSTAL_CODE,COVERAGE_TEMPLATE_ID,COVERAGE_TEMPLATE_NAME,COVERAGE_TEMPLATE_DESC,COVERAGE_BEGIN_DATE,COVERAGE_END_DATE,SERVICE_SALES_REP_USR_ID,SERVICE_SALES_REP_USR_NAME,SERVICE_LINE_INVENTORY_ITEM_ID,BILLTO_CSC_ID,BILLTO_CSC_NAME,BILLTO_GU_ID,BILLTO_GU_NAME,BILL_TO_CUSTOMER_SALES_CHANNEL,CURRENCY_CODE,CONTRACT_LIST_AMT,CONTRACT_NET_AMT,USD_CONTRACT_LIST_AMT,USD_CONTRACT_NET_AMT,ACCOUNT_TEAM,RENEWAL_SSR,RENEWAL_TEAM,SALES_REGION,ADVANCE_CONTRACT_FLAG,EARLIEST_END_DATE,SERVICE_LINE_TERMINATED_DATE,SVC_LINE_TERMINATION_REASON,CONTRACT_TERMINATED_DATE,USD_CONV_RATE,PRICE_TYPE,NET_VALUE,COTERM_DATE,MARKETING_PROGRAM,MASTER_AGREEMENT_END_DATE,DISCOUNT_PERCENT,PRORATE_FLAG,RGP_ID,CREATION_DATE,CREATED_BY,LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATED_LOGIN,REQUEST_ID,PROGRAM_UPDATE_DATE,PROGRAM_APPLICATION_ID,PROGRAM_ID,ATTRIBUTE_CATEGORY,ATTRIBUTE1,ATTRIBUTE2,ATTRIBUTE3,ATTRIBUTE4,ATTRIBUTE5,ATTRIBUTE6,ATTRIBUTE7,ATTRIBUTE8,ATTRIBUTE9,ATTRIBUTE10,ATTRIBUTE11,ATTRIBUTE12,ATTRIBUTE13,ATTRIBUTE14,ATTRIBUTE15,ATTRIBUTE16,ATTRIBUTE17,ATTRIBUTE18,ATTRIBUTE19,ATTRIBUTE20,ACCOUNT_SSR,SHELL_CONTRACT_FLAG,CONTRACT_START_DATE,CONTRACT_END_DATE from XXCCS_DS_SAHDR_CORE where \$CONDITIONS " --split-by CONTRACT_NUMBER -m 4 --null-string '\\N' --null-non-string '\\N' --hive-delims-replacement '<EOL>' --boundary-query 'select (select min(CONTRACT_NUMBER) from XXCCS_DS_SAHDR_CORE) as minid ,(select max(CONTRACT_NUMBER) from XXCCS_DS_SAHDR_CORE) as maxid from dual' --target-dir /app/dev/SmartAnalytics/sqoop_temp//XXCCS_DS_SAHDR_CORE --hive-import --hive-overwrite --hive-table installbase.XXCCS_DS_SAHDR_CORE --map-column-hive CONTRACT_ID=BIGINT,SERVICE_LINE_ID=BIGINT,HDR_CUST_ACCOUNT_ID=BIGINT,HDR_PARTY_ID=BIGINT,LINE_CUST_ACCOUNT_ID=BIGINT,LINE_PARTY_ID=BIGINT,BILL_TO_SITE_USE_ID=BIGINT,BILL_TO_CUST_ACCT_ID=BIGINT,BILL_TO_CUST_ACCT_SITE_ID=BIGINT,BILL_TO_PARTY_ID=BIGINT,BILL_TO_PARTY_SITE_ID=BIGINT,BILL_TO_LOCATION_ID=BIGINT,COVERAGE_TEMPLATE_ID=BIGINT,COVERAGE_BEGIN_DATE=TIMESTAMP,COVERAGE_END_DATE=TIMESTAMP,SERVICE_LINE_INVENTORY_ITEM_ID=BIGINT,BILLTO_CSC_ID=BIGINT,BILLTO_GU_ID=BIGINT,CONTRACT_LIST_AMT=BIGINT,CONTRACT_NET_AMT=BIGINT,USD_CONTRACT_LIST_AMT=BIGINT,USD_CONTRACT_NET_AMT=BIGINT,EARLIEST_END_DATE=TIMESTAMP,SERVICE_LINE_TERMINATED_DATE=TIMESTAMP,CONTRACT_TERMINATED_DATE=TIMESTAMP,USD_CONV_RATE=BIGINT,NET_VALUE=BIGINT,MASTER_AGREEMENT_END_DATE=TIMESTAMP,DISCOUNT_PERCENT=BIGINT,PRORATE_FLAG=STRING,RGP_ID=BIGINT,CREATION_DATE=TIMESTAMP,CREATED_BY=BIGINT,LAST_UPDATE_DATE=TIMESTAMP,LAST_UPDATED_BY=BIGINT,LAST_UPDATED_LOGIN=BIGINT,REQUEST_ID=BIGINT,PROGRAM_UPDATE_DATE=TIMESTAMP,PROGRAM_APPLICATION_ID=BIGINT,PROGRAM_ID=BIGINT,ATTRIBUTE_CATEGORY=STRING,ATTRIBUTE1=STRING,ATTRIBUTE2=STRING,ATTRIBUTE3=STRING,ATTRIBUTE4=STRING,ATTRIBUTE5=STRING,ATTRIBUTE6=STRING,ATTRIBUTE7=STRING,ATTRIBUTE8=STRING,ATTRIBUTE9=STRING,ATTRIBUTE10=STRING,ATTRIBUTE11=STRING,ATTRIBUTE12=STRING,ATTRIBUTE13=STRING,ATTRIBUTE14=STRING,ATTRIBUTE15=STRING,ATTRIBUTE16=STRING,ATTRIBUTE17=STRING,ATTRIBUTE18=STRING,ATTRIBUTE19=STRING,ATTRIBUTE20=STRING,ACCOUNT_SSR=STRING,SHELL_CONTRACT_FLAG=STRING,CONTRACT_START_DATE=TIMESTAMP,CONTRACT_END_DATE=TIMESTAMP" >> /apps/pentaho_nfs/installbase/input/poc/logs/IB_logs.log 2>&1 ": error=36, File name too long
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at com.cisco.parallelexecutor.ParallelExecutor.main(ParallelExecutor.java:35)
Caused by: java.io.IOException: error=36, File name too long
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 1 more
StackTrace 2:
Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
--table or --query is required for import. (Or use sqoop import-all-tables.)
Try --help for usage instructions.
usage: sqoop import [GENERIC-ARGS] [TOOL-ARGS]
Common arguments:
--connect <jdbc-uri> Specify JDBC connect
string
--connection-manager <class-name> Specify connection manager
class name
--connection-param-file <properties-file> Specify connection
parameters file
--driver <class-name> Manually specify JDBC
driver class to use
--hadoop-home <hdir> Override
$HADOOP_MAPRED_HOME_ARG
--hadoop-mapred-home <dir> Override
$HADOOP_MAPRED_HOME_ARG
--help Print usage instructions
-P Read password from console
--password <password> Set authentication
password
--password-file <password-file> Set authentication
password file path
--username <username> Set authentication
username
--verbose Print more information
while working
Import control arguments:
--append Imports data
in append
mode
--as-avrodatafile Imports data
to Avro data
files
--as-sequencefile Imports data
to
SequenceFile
s
--as-textfile Imports data
as plain
text
(default)
--boundary-query <statement> Set boundary
query for
retrieving
max and min
value of the
primary key
--columns <col,col,col...> Columns to
import from
table
--compression-codec <codec> Compression
codec to use
for import
--delete-target-dir Imports data
in delete
mode
--direct Use direct
import fast
The issue is resolved after making the following changes in the code.
String[] command = { "ssh", "hddev-chost-01-01", "\"" + element + "\"" };
I am passing the command as a string array as per the ProcessBuilder documentation. Instead of sending the whole command as an array i am substituting the below command as as string "element".
String element = "sqoop import -D oraoop.disabled=true -D mapred.child.java.opts='\-Djava.security.egd=file:/dev/../dev/urandom' --connect 'jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=maildude.com)(PORT=1533))(CONNECT_DATA=(SERVICE_NAME=SDA.COM)(Server=Dedicated)))' --username user --password pass --query \"select INVENTORY_ITEM_ID,ORGANIZATION_ID,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,SUMMARY_FLAG,ENABLED_FLAG,START_DATE_ACTIVE,END_DATE_ACTIVE,DESCRIPTION,BUYER_ID,ACCOUNTING_RULE_ID,INVOICING_RULE_ID,SEGMENT1,SEGMENT2,SEGMENT3,SEGMENT4,SEGMENT5,SEGMENT6,SEGMENT7,SEGMENT8,SEGMENT9,SEGMENT10,SEGMENT11,SEGMENT12,SEGMENT13,SEGMENT14,SEGMENT15,SEGMENT16,SEGMENT17,SEGMENT18,SEGMENT19,SEGMENT20,ATTRIBUTE_CATEGORY,ATTRIBUTE1,ATTRIBUTE2,ATTRIBUTE3,ATTRIBUTE4,ATTRIBUTE5,ATTRIBUTE6,ATTRIBUTE7,ATTRIBUTE8,ATTRIBUTE9,ATTRIBUTE10,ATTRIBUTE11,ATTRIBUTE12,ATTRIBUTE13,ATTRIBUTE14,ATTRIBUTE15,PURCHASING_ITEM_FLAG,SHIPPABLE_ITEM_FLAG,CUSTOMER_ORDER_FLAG,INTERNAL_ORDER_FLAG,SERVICE_ITEM_FLAG,INVENTORY_ITEM_FLAG,ENG_ITEM_FLAG,INVENTORY_ASSET_FLAG,PURCHASING_ENABLED_FLAG,CUSTOMER_ORDER_ENABLED_FLAG,INTERNAL_ORDER_ENABLED_FLAG,SO_TRANSACTIONS_FLAG,MTL_TRANSACTIONS_ENABLED_FLAG,STOCK_ENABLED_FLAG,BOM_ENABLED_FLAG,BUILD_IN_WIP_FLAG,REVISION_QTY_CONTROL_CODE,ITEM_CATALOG_GROUP_ID,CATALOG_STATUS_FLAG,RETURNABLE_FLAG,DEFAULT_SHIPPING_ORG,COLLATERAL_FLAG,TAXABLE_FLAG,QTY_RCV_EXCEPTION_CODE,ALLOW_ITEM_DESC_UPDATE_FLAG,INSPECTION_REQUIRED_FLAG,RECEIPT_REQUIRED_FLAG,MARKET_PRICE,HAZARD_CLASS_ID,RFQ_REQUIRED_FLAG,QTY_RCV_TOLERANCE,LIST_PRICE_PER_UNIT,UN_NUMBER_ID,PRICE_TOLERANCE_PERCENT,ASSET_CATEGORY_ID,ROUNDING_FACTOR,UNIT_OF_ISSUE,ENFORCE_SHIP_TO_LOCATION_CODE,ALLOW_SUBSTITUTE_RECEIPTS_FLAG,ALLOW_UNORDERED_RECEIPTS_FLAG,ALLOW_EXPRESS_DELIVERY_FLAG,DAYS_EARLY_RECEIPT_ALLOWED,DAYS_LATE_RECEIPT_ALLOWED,RECEIPT_DAYS_EXCEPTION_CODE,RECEIVING_ROUTING_ID,INVOICE_CLOSE_TOLERANCE,RECEIVE_CLOSE_TOLERANCE,AUTO_LOT_ALPHA_PREFIX,START_AUTO_LOT_NUMBER,LOT_CONTROL_CODE,SHELF_LIFE_CODE,SHELF_LIFE_DAYS,SERIAL_NUMBER_CONTROL_CODE,START_AUTO_SERIAL_NUMBER,AUTO_SERIAL_ALPHA_PREFIX,SOURCE_TYPE,SOURCE_ORGANIZATION_ID,SOURCE_SUBINVENTORY,EXPENSE_ACCOUNT,ENCUMBRANCE_ACCOUNT,RESTRICT_SUBINVENTORIES_CODE,UNIT_WEIGHT,WEIGHT_UOM_CODE,VOLUME_UOM_CODE,UNIT_VOLUME,RESTRICT_LOCATORS_CODE,LOCATION_CONTROL_CODE,SHRINKAGE_RATE,ACCEPTABLE_EARLY_DAYS,PLANNING_TIME_FENCE_CODE,DEMAND_TIME_FENCE_CODE,LEAD_TIME_LOT_SIZE,STD_LOT_SIZE,CUM_MANUFACTURING_LEAD_TIME,OVERRUN_PERCENTAGE,MRP_CALCULATE_ATP_FLAG,ACCEPTABLE_RATE_INCREASE,ACCEPTABLE_RATE_DECREASE,CUMULATIVE_TOTAL_LEAD_TIME,PLANNING_TIME_FENCE_DAYS,DEMAND_TIME_FENCE_DAYS,END_ASSEMBLY_PEGGING_FLAG,REPETITIVE_PLANNING_FLAG,PLANNING_EXCEPTION_SET,BOM_ITEM_TYPE,PICK_COMPONENTS_FLAG,REPLENISH_TO_ORDER_FLAG,BASE_ITEM_ID,ATP_COMPONENTS_FLAG,ATP_FLAG,FIXED_LEAD_TIME,VARIABLE_LEAD_TIME,WIP_SUPPLY_LOCATOR_ID,WIP_SUPPLY_TYPE,WIP_SUPPLY_SUBINVENTORY,PRIMARY_UOM_CODE,PRIMARY_UNIT_OF_MEASURE,ALLOWED_UNITS_LOOKUP_CODE,COST_OF_SALES_ACCOUNT,SALES_ACCOUNT,DEFAULT_INCLUDE_IN_ROLLUP_FLAG,INVENTORY_ITEM_STATUS_CODE,INVENTORY_PLANNING_CODE,PLANNER_CODE,PLANNING_MAKE_BUY_CODE,FIXED_LOT_MULTIPLIER,ROUNDING_CONTROL_TYPE,CARRYING_COST,POSTPROCESSING_LEAD_TIME,PREPROCESSING_LEAD_TIME,FULL_LEAD_TIME,ORDER_COST,MRP_SAFETY_STOCK_PERCENT,MRP_SAFETY_STOCK_CODE,MIN_MINMAX_QUANTITY,MAX_MINMAX_QUANTITY,MINIMUM_ORDER_QUANTITY,FIXED_ORDER_QUANTITY,FIXED_DAYS_SUPPLY,MAXIMUM_ORDER_QUANTITY,ATP_RULE_ID,PICKING_RULE_ID,RESERVABLE_TYPE,POSITIVE_MEASUREMENT_ERROR,NEGATIVE_MEASUREMENT_ERROR,ENGINEERING_ECN_CODE,ENGINEERING_ITEM_ID,ENGINEERING_DATE,SERVICE_STARTING_DELAY,VENDOR_WARRANTY_FLAG,SERVICEABLE_COMPONENT_FLAG,SERVICEABLE_PRODUCT_FLAG,BASE_WARRANTY_SERVICE_ID,PAYMENT_TERMS_ID,PREVENTIVE_MAINTENANCE_FLAG,PRIMARY_SPECIALIST_ID,SECONDARY_SPECIALIST_ID,SERVICEABLE_ITEM_CLASS_ID,TIME_BILLABLE_FLAG,MATERIAL_BILLABLE_FLAG,EXPENSE_BILLABLE_FLAG,PRORATE_SERVICE_FLAG,COVERAGE_SCHEDULE_ID,SERVICE_DURATION_PERIOD_CODE,SERVICE_DURATION,WARRANTY_VENDOR_ID,MAX_WARRANTY_AMOUNT,RESPONSE_TIME_PERIOD_CODE,RESPONSE_TIME_VALUE,NEW_REVISION_CODE,INVOICEABLE_ITEM_FLAG,TAX_CODE,INVOICE_ENABLED_FLAG,MUST_USE_APPROVED_VENDOR_FLAG,REQUEST_ID,PROGRAM_APPLICATION_ID,PROGRAM_ID,PROGRAM_UPDATE_DATE,OUTSIDE_OPERATION_FLAG,OUTSIDE_OPERATION_UOM_TYPE,SAFETY_STOCK_BUCKET_DAYS,AUTO_REDUCE_MPS,COSTING_ENABLED_FLAG,AUTO_CREATED_CONFIG_FLAG,CYCLE_COUNT_ENABLED_FLAG,ITEM_TYPE,MODEL_CONFIG_CLAUSE_NAME,SHIP_MODEL_COMPLETE_FLAG,MRP_PLANNING_CODE,RETURN_INSPECTION_REQUIREMENT,ATO_FORECAST_CONTROL,RELEASE_TIME_FENCE_CODE,RELEASE_TIME_FENCE_DAYS,CONTAINER_ITEM_FLAG,VEHICLE_ITEM_FLAG,MAXIMUM_LOAD_WEIGHT,MINIMUM_FILL_PERCENT,CONTAINER_TYPE_CODE,INTERNAL_VOLUME,WH_UPDATE_DATE,PRODUCT_FAMILY_ITEM_ID,GLOBAL_ATTRIBUTE_CATEGORY,GLOBAL_ATTRIBUTE1,GLOBAL_ATTRIBUTE2,GLOBAL_ATTRIBUTE3,GLOBAL_ATTRIBUTE4,GLOBAL_ATTRIBUTE5,GLOBAL_ATTRIBUTE6,GLOBAL_ATTRIBUTE7,GLOBAL_ATTRIBUTE8,GLOBAL_ATTRIBUTE9,GLOBAL_ATTRIBUTE10,PURCHASING_TAX_CODE,OVERCOMPLETION_TOLERANCE_TYPE,OVERCOMPLETION_TOLERANCE_VALUE,EFFECTIVITY_CONTROL,CHECK_SHORTAGES_FLAG,OVER_SHIPMENT_TOLERANCE,UNDER_SHIPMENT_TOLERANCE,OVER_RETURN_TOLERANCE,UNDER_RETURN_TOLERANCE,EQUIPMENT_TYPE,RECOVERED_PART_DISP_CODE,DEFECT_TRACKING_ON_FLAG,USAGE_ITEM_FLAG,EVENT_FLAG,ELECTRONIC_FLAG,DOWNLOADABLE_FLAG,VOL_DISCOUNT_EXEMPT_FLAG,COUPON_EXEMPT_FLAG,COMMS_NL_TRACKABLE_FLAG,ASSET_CREATION_CODE,COMMS_ACTIVATION_REQD_FLAG,ORDERABLE_ON_WEB_FLAG,BACK_ORDERABLE_FLAG,WEB_STATUS,INDIVISIBLE_FLAG,DIMENSION_UOM_CODE,UNIT_LENGTH,UNIT_WIDTH,UNIT_HEIGHT,BULK_PICKED_FLAG,LOT_STATUS_ENABLED,DEFAULT_LOT_STATUS_ID,SERIAL_STATUS_ENABLED,DEFAULT_SERIAL_STATUS_ID,LOT_SPLIT_ENABLED,LOT_MERGE_ENABLED,INVENTORY_CARRY_PENALTY,OPERATION_SLACK_PENALTY,FINANCING_ALLOWED_FLAG,EAM_ITEM_TYPE,EAM_ACTIVITY_TYPE_CODE,EAM_ACTIVITY_CAUSE_CODE,EAM_ACT_NOTIFICATION_FLAG,EAM_ACT_SHUTDOWN_STATUS,DUAL_UOM_CONTROL,SECONDARY_UOM_CODE,DUAL_UOM_DEVIATION_HIGH,DUAL_UOM_DEVIATION_LOW,CONTRACT_ITEM_TYPE_CODE,SUBSCRIPTION_DEPEND_FLAG,SERV_REQ_ENABLED_CODE,SERV_BILLING_ENABLED_FLAG,SERV_IMPORTANCE_LEVEL,PLANNED_INV_POINT_FLAG,LOT_TRANSLATE_ENABLED,DEFAULT_SO_SOURCE_TYPE,CREATE_SUPPLY_FLAG,SUBSTITUTION_WINDOW_CODE,SUBSTITUTION_WINDOW_DAYS,IB_ITEM_INSTANCE_CLASS,CONFIG_MODEL_TYPE,LOT_SUBSTITUTION_ENABLED,MINIMUM_LICENSE_QUANTITY,EAM_ACTIVITY_SOURCE_CODE,LIFECYCLE_ID,CURRENT_PHASE_ID,OBJECT_VERSION_NUMBER,CDB_DATA_SOURCE,CDB_ENQUEUE_TIME,CDB_DEQUEUE_TIME,CDB_ENQUEUE_SEQ from MTL_SYSTEM_ITEMS_B where \\\$CONDITIONS \" --target-dir /app/dev/SmartAnalytics/sqoop_temp//MTL_SYSTEM_ITEMS_B -m 4 --split-by INVENTORY_ITEM_ID --hive-import --hive-overwrite --hive-table installbase.MTL_SYSTEM_ITEMS_B --null-string '\\\\N' --null-non-string '\\\\N' --hive-delims-replacement '<EOL>' --map-column-hive INVENTORY_ITEM_ID=BIGINT,ORGANIZATION_ID=BIGINT,LAST_UPDATE_DATE=TIMESTAMP,LAST_UPDATED_BY=BIGINT,CREATION_DATE=TIMESTAMP,CREATED_BY=BIGINT,LAST_UPDATE_LOGIN=BIGINT,SUMMARY_FLAG=STRING,ENABLED_FLAG=STRING,START_DATE_ACTIVE=TIMESTAMP,END_DATE_ACTIVE=TIMESTAMP,DESCRIPTION=STRING,BUYER_ID=BIGINT,ACCOUNTING_RULE_ID=BIGINT,INVOICING_RULE_ID=BIGINT,SEGMENT1=STRING,SEGMENT2=STRING,SEGMENT3=STRING,SEGMENT4=STRING,SEGMENT5=STRING,SEGMENT6=STRING,SEGMENT7=STRING,SEGMENT8=STRING,SEGMENT9=STRING,SEGMENT10=STRING,SEGMENT11=STRING,SEGMENT12=STRING,SEGMENT13=STRING,SEGMENT14=STRING,SEGMENT15=STRING,SEGMENT16=STRING,SEGMENT17=STRING,SEGMENT18=STRING,SEGMENT19=STRING,SEGMENT20=STRING,ATTRIBUTE_CATEGORY=STRING,ATTRIBUTE1=STRING,ATTRIBUTE2=STRING,ATTRIBUTE3=STRING,ATTRIBUTE4=STRING,ATTRIBUTE5=STRING,ATTRIBUTE6=STRING,ATTRIBUTE7=STRING,ATTRIBUTE8=STRING,ATTRIBUTE9=STRING,ATTRIBUTE10=STRING,ATTRIBUTE11=STRING,ATTRIBUTE12=STRING,ATTRIBUTE13=STRING,ATTRIBUTE14=STRING,ATTRIBUTE15=STRING,PURCHASING_ITEM_FLAG=STRING,SHIPPABLE_ITEM_FLAG=STRING,CUSTOMER_ORDER_FLAG=STRING,INTERNAL_ORDER_FLAG=STRING,SERVICE_ITEM_FLAG=STRING,INVENTORY_ITEM_FLAG=STRING,ENG_ITEM_FLAG=STRING,INVENTORY_ASSET_FLAG=STRING,PURCHASING_ENABLED_FLAG=STRING,CUSTOMER_ORDER_ENABLED_FLAG=STRING,INTERNAL_ORDER_ENABLED_FLAG=STRING,SO_TRANSACTIONS_FLAG=STRING,MTL_TRANSACTIONS_ENABLED_FLAG=STRING,STOCK_ENABLED_FLAG=STRING,BOM_ENABLED_FLAG=STRING,BUILD_IN_WIP_FLAG=STRING,REVISION_QTY_CONTROL_CODE=BIGINT,ITEM_CATALOG_GROUP_ID=BIGINT,CATALOG_STATUS_FLAG=STRING,RETURNABLE_FLAG=STRING,DEFAULT_SHIPPING_ORG=BIGINT,COLLATERAL_FLAG=STRING,TAXABLE_FLAG=STRING,QTY_RCV_EXCEPTION_CODE=STRING,ALLOW_ITEM_DESC_UPDATE_FLAG=STRING,INSPECTION_REQUIRED_FLAG=STRING,RECEIPT_REQUIRED_FLAG=STRING,MARKET_PRICE=BIGINT,HAZARD_CLASS_ID=BIGINT,RFQ_REQUIRED_FLAG=STRING,QTY_RCV_TOLERANCE=BIGINT,LIST_PRICE_PER_UNIT=BIGINT,UN_NUMBER_ID=BIGINT,PRICE_TOLERANCE_PERCENT=BIGINT,ASSET_CATEGORY_ID=BIGINT,ROUNDING_FACTOR=BIGINT,UNIT_OF_ISSUE=STRING,ENFORCE_SHIP_TO_LOCATION_CODE=STRING,ALLOW_SUBSTITUTE_RECEIPTS_FLAG=STRING,ALLOW_UNORDERED_RECEIPTS_FLAG=STRING,ALLOW_EXPRESS_DELIVERY_FLAG=STRING,DAYS_EARLY_RECEIPT_ALLOWED=BIGINT,DAYS_LATE_RECEIPT_ALLOWED=BIGINT,RECEIPT_DAYS_EXCEPTION_CODE=STRING,RECEIVING_ROUTING_ID=BIGINT,INVOICE_CLOSE_TOLERANCE=BIGINT,RECEIVE_CLOSE_TOLERANCE=BIGINT,AUTO_LOT_ALPHA_PREFIX=STRING,START_AUTO_LOT_NUMBER=STRING,LOT_CONTROL_CODE=BIGINT,SHELF_LIFE_CODE=BIGINT,SHELF_LIFE_DAYS=BIGINT,SERIAL_NUMBER_CONTROL_CODE=BIGINT,START_AUTO_SERIAL_NUMBER=STRING,AUTO_SERIAL_ALPHA_PREFIX=STRING,SOURCE_TYPE=BIGINT,SOURCE_ORGANIZATION_ID=BIGINT,SOURCE_SUBINVENTORY=STRING,EXPENSE_ACCOUNT=BIGINT,ENCUMBRANCE_ACCOUNT=BIGINT,RESTRICT_SUBINVENTORIES_CODE=BIGINT,UNIT_WEIGHT=BIGINT,WEIGHT_UOM_CODE=STRING,VOLUME_UOM_CODE=STRING,UNIT_VOLUME=BIGINT,RESTRICT_LOCATORS_CODE=BIGINT,LOCATION_CONTROL_CODE=BIGINT,SHRINKAGE_RATE=BIGINT,ACCEPTABLE_EARLY_DAYS=BIGINT,PLANNING_TIME_FENCE_CODE=BIGINT,DEMAND_TIME_FENCE_CODE=BIGINT,LEAD_TIME_LOT_SIZE=BIGINT,STD_LOT_SIZE=BIGINT,CUM_MANUFACTURING_LEAD_TIME=BIGINT,OVERRUN_PERCENTAGE=BIGINT,MRP_CALCULATE_ATP_FLAG=STRING,ACCEPTABLE_RATE_INCREASE=BIGINT,ACCEPTABLE_RATE_DECREASE=BIGINT,CUMULATIVE_TOTAL_LEAD_TIME=BIGINT,PLANNING_TIME_FENCE_DAYS=BIGINT,DEMAND_TIME_FENCE_DAYS=BIGINT,END_ASSEMBLY_PEGGING_FLAG=STRING,REPETITIVE_PLANNING_FLAG=STRING,PLANNING_EXCEPTION_SET=STRING,BOM_ITEM_TYPE=BIGINT,PICK_COMPONENTS_FLAG=STRING,REPLENISH_TO_ORDER_FLAG=STRING,BASE_ITEM_ID=BIGINT,ATP_COMPONENTS_FLAG=STRING,ATP_FLAG=STRING,FIXED_LEAD_TIME=BIGINT,VARIABLE_LEAD_TIME=BIGINT,WIP_SUPPLY_LOCATOR_ID=BIGINT,WIP_SUPPLY_TYPE=BIGINT,WIP_SUPPLY_SUBINVENTORY=STRING,PRIMARY_UOM_CODE=STRING,PRIMARY_UNIT_OF_MEASURE=STRING,ALLOWED_UNITS_LOOKUP_CODE=BIGINT,COST_OF_SALES_ACCOUNT=BIGINT,SALES_ACCOUNT=BIGINT,DEFAULT_INCLUDE_IN_ROLLUP_FLAG=STRING,INVENTORY_ITEM_STATUS_CODE=STRING,INVENTORY_PLANNING_CODE=BIGINT,PLANNER_CODE=STRING,PLANNING_MAKE_BUY_CODE=BIGINT,FIXED_LOT_MULTIPLIER=BIGINT,ROUNDING_CONTROL_TYPE=BIGINT,CARRYING_COST=BIGINT,POSTPROCESSING_LEAD_TIME=BIGINT,PREPROCESSING_LEAD_TIME=BIGINT,FULL_LEAD_TIME=BIGINT,ORDER_COST=BIGINT,MRP_SAFETY_STOCK_PERCENT=BIGINT,MRP_SAFETY_STOCK_CODE=BIGINT,MIN_MINMAX_QUANTITY=BIGINT,MAX_MINMAX_QUANTITY=BIGINT,MINIMUM_ORDER_QUANTITY=BIGINT,FIXED_ORDER_QUANTITY=BIGINT,FIXED_DAYS_SUPPLY=BIGINT,MAXIMUM_ORDER_QUANTITY=BIGINT,ATP_RULE_ID=BIGINT,PICKING_RULE_ID=BIGINT,RESERVABLE_TYPE=BIGINT,POSITIVE_MEASUREMENT_ERROR=BIGINT,NEGATIVE_MEASUREMENT_ERROR=BIGINT,ENGINEERING_ECN_CODE=STRING,ENGINEERING_ITEM_ID=BIGINT,ENGINEERING_DATE=TIMESTAMP,SERVICE_STARTING_DELAY=BIGINT,VENDOR_WARRANTY_FLAG=STRING,SERVICEABLE_COMPONENT_FLAG=STRING,SERVICEABLE_PRODUCT_FLAG=STRING,BASE_WARRANTY_SERVICE_ID=BIGINT,PAYMENT_TERMS_ID=BIGINT,PREVENTIVE_MAINTENANCE_FLAG=STRING,PRIMARY_SPECIALIST_ID=BIGINT,SECONDARY_SPECIALIST_ID=BIGINT,SERVICEABLE_ITEM_CLASS_ID=BIGINT,TIME_BILLABLE_FLAG=STRING,MATERIAL_BILLABLE_FLAG=STRING,EXPENSE_BILLABLE_FLAG=STRING,PRORATE_SERVICE_FLAG=STRING,COVERAGE_SCHEDULE_ID=BIGINT,SERVICE_DURATION_PERIOD_CODE=STRING,SERVICE_DURATION=BIGINT,WARRANTY_VENDOR_ID=BIGINT,MAX_WARRANTY_AMOUNT=BIGINT,RESPONSE_TIME_PERIOD_CODE=STRING,RESPONSE_TIME_VALUE=BIGINT,NEW_REVISION_CODE=STRING,INVOICEABLE_ITEM_FLAG=STRING,TAX_CODE=STRING,INVOICE_ENABLED_FLAG=STRING,MUST_USE_APPROVED_VENDOR_FLAG=STRING,REQUEST_ID=BIGINT,PROGRAM_APPLICATION_ID=BIGINT,PROGRAM_ID=BIGINT,PROGRAM_UPDATE_DATE=TIMESTAMP,OUTSIDE_OPERATION_FLAG=STRING,OUTSIDE_OPERATION_UOM_TYPE=STRING,SAFETY_STOCK_BUCKET_DAYS=BIGINT,AUTO_REDUCE_MPS=BIGINT,COSTING_ENABLED_FLAG=STRING,AUTO_CREATED_CONFIG_FLAG=STRING,CYCLE_COUNT_ENABLED_FLAG=STRING,ITEM_TYPE=STRING,MODEL_CONFIG_CLAUSE_NAME=STRING,SHIP_MODEL_COMPLETE_FLAG=STRING,MRP_PLANNING_CODE=BIGINT,RETURN_INSPECTION_REQUIREMENT=BIGINT,ATO_FORECAST_CONTROL=BIGINT,RELEASE_TIME_FENCE_CODE=BIGINT,RELEASE_TIME_FENCE_DAYS=BIGINT,CONTAINER_ITEM_FLAG=STRING,VEHICLE_ITEM_FLAG=STRING,MAXIMUM_LOAD_WEIGHT=BIGINT,MINIMUM_FILL_PERCENT=BIGINT,CONTAINER_TYPE_CODE=STRING,INTERNAL_VOLUME=BIGINT,WH_UPDATE_DATE=TIMESTAMP,PRODUCT_FAMILY_ITEM_ID=BIGINT,GLOBAL_ATTRIBUTE_CATEGORY=STRING,GLOBAL_ATTRIBUTE1=STRING,GLOBAL_ATTRIBUTE2=STRING,GLOBAL_ATTRIBUTE3=STRING,GLOBAL_ATTRIBUTE4=STRING,GLOBAL_ATTRIBUTE5=STRING,GLOBAL_ATTRIBUTE6=STRING,GLOBAL_ATTRIBUTE7=STRING,GLOBAL_ATTRIBUTE8=STRING,GLOBAL_ATTRIBUTE9=STRING,GLOBAL_ATTRIBUTE10=STRING,PURCHASING_TAX_CODE=STRING,OVERCOMPLETION_TOLERANCE_TYPE=BIGINT,OVERCOMPLETION_TOLERANCE_VALUE=BIGINT,EFFECTIVITY_CONTROL=BIGINT,CHECK_SHORTAGES_FLAG=STRING,OVER_SHIPMENT_TOLERANCE=BIGINT,UNDER_SHIPMENT_TOLERANCE=BIGINT,OVER_RETURN_TOLERANCE=BIGINT,UNDER_RETURN_TOLERANCE=BIGINT,EQUIPMENT_TYPE=BIGINT,RECOVERED_PART_DISP_CODE=STRING,DEFECT_TRACKING_ON_FLAG=STRING,USAGE_ITEM_FLAG=STRING,EVENT_FLAG=STRING,ELECTRONIC_FLAG=STRING,DOWNLOADABLE_FLAG=STRING,VOL_DISCOUNT_EXEMPT_FLAG=STRING,COUPON_EXEMPT_FLAG=STRING,COMMS_NL_TRACKABLE_FLAG=STRING,ASSET_CREATION_CODE=STRING,COMMS_ACTIVATION_REQD_FLAG=STRING,ORDERABLE_ON_WEB_FLAG=STRING,BACK_ORDERABLE_FLAG=STRING,WEB_STATUS=STRING,INDIVISIBLE_FLAG=STRING,DIMENSION_UOM_CODE=STRING,UNIT_LENGTH=BIGINT,UNIT_WIDTH=BIGINT,UNIT_HEIGHT=BIGINT,BULK_PICKED_FLAG=STRING,LOT_STATUS_ENABLED=STRING,DEFAULT_LOT_STATUS_ID=BIGINT,SERIAL_STATUS_ENABLED=STRING,DEFAULT_SERIAL_STATUS_ID=BIGINT,LOT_SPLIT_ENABLED=STRING,LOT_MERGE_ENABLED=STRING,INVENTORY_CARRY_PENALTY=BIGINT,OPERATION_SLACK_PENALTY=BIGINT,FINANCING_ALLOWED_FLAG=STRING,EAM_ITEM_TYPE=BIGINT,EAM_ACTIVITY_TYPE_CODE=STRING,EAM_ACTIVITY_CAUSE_CODE=STRING,EAM_ACT_NOTIFICATION_FLAG=STRING,EAM_ACT_SHUTDOWN_STATUS=STRING,DUAL_UOM_CONTROL=BIGINT,SECONDARY_UOM_CODE=STRING,DUAL_UOM_DEVIATION_HIGH=BIGINT,DUAL_UOM_DEVIATION_LOW=BIGINT,CONTRACT_ITEM_TYPE_CODE=STRING,SUBSCRIPTION_DEPEND_FLAG=STRING,SERV_REQ_ENABLED_CODE=STRING,SERV_BILLING_ENABLED_FLAG=STRING,SERV_IMPORTANCE_LEVEL=BIGINT,PLANNED_INV_POINT_FLAG=STRING,LOT_TRANSLATE_ENABLED=STRING,DEFAULT_SO_SOURCE_TYPE=STRING,CREATE_SUPPLY_FLAG=STRING,SUBSTITUTION_WINDOW_CODE=BIGINT,SUBSTITUTION_WINDOW_DAYS=BIGINT,IB_ITEM_INSTANCE_CLASS=STRING,CONFIG_MODEL_TYPE=STRING,LOT_SUBSTITUTION_ENABLED=STRING,MINIMUM_LICENSE_QUANTITY=BIGINT,EAM_ACTIVITY_SOURCE_CODE=STRING,LIFECYCLE_ID=BIGINT,CURRENT_PHASE_ID=BIGINT,OBJECT_VERSION_NUMBER=BIGINT,CDB_DATA_SOURCE=STRING,CDB_ENQUEUE_TIME=TIMESTAMP,CDB_DEQUEUE_TIME=TIMESTAMP,CDB_ENQUEUE_SEQ=BIGINT --boundary-query 'select (select min(INVENTORY_ITEM_ID) from MTL_SYSTEM_ITEMS_B) as minid ,(select max(INVENTORY_ITEM_ID) from MTL_SYSTEM_ITEMS_B) as maxid from dual' " >> /apps/pentaho_nfs/installbase/input/poc/logs/IB_logs.log 2>&1"
public void run() {
ProcessBuilder processbuilder = new ProcessBuilder(command);
LOGGER.info(command);
try {
Process process = processbuilder.inheritIO().start();
System.out.println("inside process builder ");
process.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String readline;
while ((readline = reader.readLine()) != null) {
LOGGER.info(readline);
}
} catch (Exception e) {
LOGGER.error(e.getMessage());
}
}