forked from D-Net/dnet-hadoop
Update copyDataToImpalaCluster.sh
This commit is contained in:
parent
2032b0df40
commit
42b8ce2ba4
|
@ -22,13 +22,13 @@ function copydb() {
|
||||||
hdfs dfs -conf /etc/impala_cluster/hdfs-site.xml -chmod -R 777 /tmp/$FILE/${db}.db
|
hdfs dfs -conf /etc/impala_cluster/hdfs-site.xml -chmod -R 777 /tmp/$FILE/${db}.db
|
||||||
|
|
||||||
# drop tables from db
|
# drop tables from db
|
||||||
for i in `impala-shell --user $HADOOP_USER_NAME-i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
|
for i in `impala-shell --user $HADOOP_USER_NAME -i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
|
||||||
do
|
do
|
||||||
`impala-shell -i impala-cluster-dn1.openaire.eu -d -d ${db} -q "drop table $i;"`;
|
`impala-shell -i impala-cluster-dn1.openaire.eu -d -d ${db} -q "drop table $i;"`;
|
||||||
done
|
done
|
||||||
|
|
||||||
# drop views from db
|
# drop views from db
|
||||||
for i in `impala-shell --user $HADOOP_USER_NAME-i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
|
for i in `impala-shell --user $HADOOP_USER_NAME -i impala-cluster-dn1.openaire.eu -d ${db} --delimited -q "show tables"`;
|
||||||
do
|
do
|
||||||
`impala-shell -i impala-cluster-dn1.openaire.eu -d -d ${db} -q "drop view $i;"`;
|
`impala-shell -i impala-cluster-dn1.openaire.eu -d -d ${db} -q "drop view $i;"`;
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue