Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> create table question


Copy link to this message
-
Re: create table question
For example
if ur name node was hadoop_name_nodeIP:8020

(verify this thru your browser http://hadoop_name_nodeIP:50070)

Modified Create Table
==================
CREATE EXTERNAL TABLE states(abbreviation string, full_name
string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
LOCATION 'hdfs://hp8300one:8020/tmp/states' ;

________________________________
 From: Shengjun Xin <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Tuesday, April 22, 2014 8:58 PM
Subject: Re: create table question
 
in the ql, you set relative path tmp/states, according to the error message, you need to set absolute path
On Wed, Apr 23, 2014 at 11:23 AM, EdwardKing <[EMAIL PROTECTED]> wrote:

 
create a table from an existing file, states.hql
is follows:
EXTERNAL TABLE states(abbreviation string, full_name
DELIMITED
;
-ls
native-hadoop library for your platform... using builtin-java classes where
applicable
supergroup          0 2014-04-22
20:02 tmp
states.txt tmp/states
tmp/states
native-hadoop library for your platform... using builtin-java classes where
applicable
supergroup        654 2014-04-22 20:02
tmp/states/states.txt
states.hql
mapred.reduce.tasks is deprecated. Instead, use
mapreduce.job.reduces
mapred.min.split.size is deprecated. Instead, use
mapreduce.input.fileinputformat.split.minsize
Configuration.deprecation: mapred.reduce.tasks.speculative.execution is
deprecated. Instead, use mapreduce.reduce.speculative
Configuration.deprecation: mapred.min.split.size.per.node is deprecated.
Instead, use mapreduce.input.fileinputformat.split.minsize.per.node
20:11:47 INFO Configuration.deprecation: mapred.input.dir.recursive is
deprecated. Instead, use
mapreduce.input.fileinputformat.input.dir.recursive
Configuration.deprecation: mapred.min.split.size.per.rack is deprecated.
Instead, use mapreduce.input.fileinputformat.split.minsize.per.rack
20:11:47 INFO Configuration.deprecation: mapred.max.split.size is deprecated.
Instead, use mapreduce.input.fileinputformat.split.maxsize
INFO Configuration.deprecation: mapred.committer.job.setup.cleanup.needed is
deprecated. Instead, use
mapreduce.job.committer.setup.cleanup.needed
configuration in
jar:file:/home/software/apache-hive-0.13.0-bin/lib/hive-common-0.13.0.jar!/hive-log4j.properties
Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask.
MetaException(message:java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute URI:
hdfs://master:9000./tmp/states)
it?
[main]: exec.DDLTask (DDLTask.java:createTable(4074)) - Default to
LazySimpleSerDe for table states
metastore.HiveMetaStore (HiveMetaStore.java:logInfo(624)) - 0: create_table:
Table(tableName:states, dbName:default, owner:hadoop, createTime:1398222724,
lastAccessTime:0, retention:0,
sd:StorageDescriptor(cols:[FieldSchema(name:abbreviation, type:string,
comment:null), FieldSchema(name:full_name, type:string, comment:null)],
location:tmp/states, inputFormat:org.apache.hadoop.mapred.TextInputFormat,
outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat,
compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null,
serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe,
parameters:{serialization.format= , field.delim= }), bucketCols:[],
sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[],
skewedColValues:[], skewedColValueLocationMaps:{}),
storedAsSubDirectories:false), partitionKeys:[], parameters:{EXTERNAL=TRUE},
viewOriginalText:null, viewExpandedText:null,
tableType:EXTERNAL_TABLE)
HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(306)) -
ugi=hadoop ip=unknown-ip-addr cmd=create_table:
Table(tableName:states, dbName:default, owner:hadoop, createTime:1398222724,
lastAccessTime:0, retention:0,
sd:StorageDescriptor(cols:[FieldSchema(name:abbreviation, type:string,
comment:null), FieldSchema(name:full_name, type:string, comment:null)],
location:tmp/states, inputFormat:org.apache.hadoop.mapred.TextInputFormat,
outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat,
compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null,
serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe,
parameters:{serialization.format= , field.delim= }), bucketCols:[],
sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[],
skewedColValues:[], skewedColValueLocationMaps:{}),
storedAsSubDirectories:false), partitionKeys:[], parameters:{EXTERNAL=TRUE},
viewOriginalText:null, viewExpandedText:null,
tableType:EXTERNAL_TABLE) 
metastore.RetryingHMSHandler (RetryingHMSHandler.java:invoke(143)) -
MetaException(message:java.lang.IllegalArgumentException:
java.net.URISyntaxException: Relative path in absolute URI:
hdfs://master:9000./tmp/states)
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:4616)
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1309)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:105)
$Proxy8.create_table_with_environment_context(Unknown Source)
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:558)
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:547)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:89)
$Pr
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB