postgresql jdbc错误无法从备份错误中重新创建异常:java.io.ioexception:jdbc错误

mfuanj7w  于 2021-06-21  发布在  Pig
关注(0)|答案(1)|浏览(295)

我在试着写一个Pig的剧本

  1. register 'hdfs://localhost:8020/user/pig/jars/postgresql-9.3-1100.jdbc4.jar';
  2. register 'hdfs://localhost:8020/user/pig/jars/piggybank.jar';
  3. a = load 'hdfs://localhost:8020/user/hive/warehouse/outage' USING PigStorage(',') AS (no:int, name:chararray, age:int);
  4. STORE a INTO 'test' USING org.apache.pig.piggybank.storage.DBStorage('org.postgresql.Driver','jdbc:postgresql://127.0.0.1:5432/hivedata','postgres','123','INSERT INTO test (no, name, age)values(?,?,?)');

我正在从hive获取数据,但无法写入postgresql

  1. ERROR org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher - Backend error message
  2. java.io.IOException: java.lang.RuntimeException: JDBC error
cqoc49vn

cqoc49vn1#

database "hivedata" does not exist -这是你的错误。
请记住,根据经验,在java堆栈中,最后一个 Caused By: 条款是最相关的例外。

相关问题