Sponsored Content
Top Forums Shell Programming and Scripting Shell Script for HDFS Ingestion Using JDBC Post 303025046 by RudiC on Tuesday 23rd of October 2018 11:02:10 AM
Old 10-23-2018
Welcome to the forum.


I can't talk on hadoop nor jdbc or such, but as you seem to be using bash, I can comment on a few sysntax errors in your script:
- set MVN_LIB_PATH = "adl://ayz...jar" : that's not bash, make it VAR="Value", no set, no spaces.
- if [ echo $? == 0] : no echo needed; make it [ $? == 0 ] (with all spaces!) or use "command substitution" like [ $(echo $?) == 0 ] (less effective).
- elif needs a condition, and a separate fi. Methinks else would do in this case...


Aside: while functions are a very valuable tool for scripting / programming, I can't see the benefit in above, as they all are single-lined and single call only.


Correct your errors, run the script and report back.
This User Gave Thanks to RudiC For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script to connect to database using JDBC driver?

How to connect to SQL Server database from perl script using JDBC driver? ---------- Post updated at 05:33 PM ---------- Previous update was at 05:07 PM ---------- i have sqljdbc.jar file. by setting the class path how can i connect to the database using perl script? (2 Replies)
Discussion started by: laknar
2 Replies

2. Ubuntu

JDBC Connection

Hi, I am using ubuntu os.I need some information about JDBC connection. 1.how to connect eclipse with apache tomcat server 2.I am using mysql database,how to to find the database location 3.How to set the classpath 4.How to connect Mysql with java using eclipse.I need step by step procedure... (1 Reply)
Discussion started by: snallusami
1 Replies

3. Shell Programming and Scripting

Downloading hdfs file to local UNIX through UNIX script

Hi All , I am very new to unix script.I am aware of unix commands but never put together in unix script level.If any one can suggest me technical guidance in the below scenario that will highly beneficial. Data have been already migrated from mainframe to Hadoop file system(HDFS).HDFS server... (15 Replies)
Discussion started by: STCET22
15 Replies

4. Shell Programming and Scripting

Need help how to copy few records from hdfs to UNIX

Hi All , I am facing one issue here...I have a huge file in hadoop file system.Some disk space issues are thr ,thatswhy I want to copy 1st 100 records from hdfs to local unix.I tried below command but it is no working .Its giving error like cat: Unable to write to output stream.if any one can... (2 Replies)
Discussion started by: STCET22
2 Replies

5. UNIX for Advanced & Expert Users

UNIX and HDFS - file systems on same partition.

I am learning Hadoop. As a part of that, Hdfs - Hadoop distributed file system has commands similar to unix where we can create,copy,move files from unix/linux file system to HDFS. My question is 1) how two file systems (unix and hdfs) can coexist on thr same partition.. 2)What if block used... (0 Replies)
Discussion started by: Narendra Eliset
0 Replies

6. UNIX for Beginners Questions & Answers

UNIX and HDFS - file systems on same partition.

I am learning Hadoop. As a part of that, Hdfs - Hadoop distributed file system has commands similar to unix where we can create,copy,move files from unix/linux file system to HDFS. My question is 1) how two file systems (unix and hdfs) can coexist on thr same partition.. 2)What if block... (1 Reply)
Discussion started by: Narendra Eliset
1 Replies

7. UNIX for Beginners Questions & Answers

Help with HDFS Linux permission

Hi, I am unable to change the permissions for a directory in HDFS. from what i understand acl's supersede all other permissions. even if a directory is not owned by me, but there is an acl for me with rwx then i must be able to change the permissions of that directory. Please find the... (8 Replies)
Discussion started by: desind
8 Replies

8. Shell Programming and Scripting

How to check total files size in hdfs directory?

Is there a way to calculate the total file size of HDFS file directory in GB or MB? I dont want to use du/df command. Without that is there a way HDFS Directory - /test/my_dir (1 Reply)
Discussion started by: rohit_shinez
1 Replies

9. Shell Programming and Scripting

To get latest hdfs file system

Hi All, I am having below hdfs file system /user/home/dte=2019_01_30/part_1 /user/home/dte=2019_01_30/part_2 /user/home/dte=2019_01_31/part_1 I need to take the latest month hdfs folder while passing date as parameter. For eg . if i pass as Feb month i.e. 20190201(YYYYMMDD), then... (0 Replies)
Discussion started by: Master_Mind
0 Replies
asadmin-list-jdbc-resources(1AS)				   User Commands				  asadmin-list-jdbc-resources(1AS)

NAME
asadmin-list-jdbc-resources, list-jdbc-resources - gets all the JDBC resources SYNOPSIS
list-jdbc-resources --user admin_user [--password admin_password][--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] Lists all the JDBC resources. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. --echo setting to true will echo the command line statement on the standard output. --interactive prompts you for the required options that are not already specified. Example 1: Using the list-jdbc-resources command asadmin> list-jdbc-resources --user admin1 --password adminadmin1 --host pigeon --port 5001 sample_jdbc_resource Command list-jdbc-resources executed successfully Where: sample_jdbc_resource is the JDBC resource listed. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-jdbc-resource(1AS), asadmin-delete-jdbc-resource(1AS) J2EE 1.4 SDK March 2004 asadmin-list-jdbc-resources(1AS)
All times are GMT -4. The time now is 11:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy