This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch 5.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/5.2 by this push:
new 3007f1c27e PHOENIX-7516 TableNotFoundException thrown when not specify
schema in CsvBulkloadTool (#2063)
3007f1c27e is described below
commit 3007f1c27e7e3e487324b99a4acc8f1728bfd4b4
Author: chaijunjie0101 <[email protected]>
AuthorDate: Tue Feb 4 22:43:28 2025 +0800
PHOENIX-7516 TableNotFoundException thrown when not specify schema in
CsvBulkloadTool (#2063)
---
.../java/org/apache/phoenix/mapreduce/AbstractBulkLoadTool.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/AbstractBulkLoadTool.java
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/AbstractBulkLoadTool.java
index 142aea63b7..0207f09693 100644
---
a/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/AbstractBulkLoadTool.java
+++
b/phoenix-core-server/src/main/java/org/apache/phoenix/mapreduce/AbstractBulkLoadTool.java
@@ -237,16 +237,15 @@ public abstract class AbstractBulkLoadTool extends
Configured implements Tool {
boolean ignoreInvalidRows =
cmdLine.hasOption(IGNORE_ERRORS_OPT.getOpt());
conf.setBoolean(FormatToBytesWritableMapper.IGNORE_INVALID_ROW_CONFKEY,
ignoreInvalidRows);
- conf.set(FormatToBytesWritableMapper.TABLE_NAME_CONFKEY,
- SchemaUtil.getEscapedFullTableName(qualifiedTableName));
+ String tbn =
SchemaUtil.getEscapedFullTableName(qualifiedTableName);
+ conf.set(FormatToBytesWritableMapper.TABLE_NAME_CONFKEY, tbn);
// give subclasses their hook
configureOptions(cmdLine, importColumns, conf);
String sName = SchemaUtil.normalizeIdentifier(schemaName);
String tName = SchemaUtil.normalizeIdentifier(tableName);
- String tn = SchemaUtil.getEscapedTableName(sName, tName);
ResultSet rsempty =
- conn.createStatement().executeQuery("SELECT * FROM " + tn
+ " LIMIT 1");
+ conn.createStatement().executeQuery("SELECT * FROM " + tbn
+ " LIMIT 1");
boolean tableNotEmpty = rsempty.next();
rsempty.close();