You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "杨果 (Created JIRA)" <ji...@apache.org> on 2012/01/19 10:45:40 UTC
[jira] [Created] (MAPREDUCE-3695) Error:ORA 00911 invalid
character(the result of mapreduce insert into oracle)
Error:ORA 00911 invalid character(the result of mapreduce insert into oracle)
-----------------------------------------------------------------------------
Key: MAPREDUCE-3695
URL: https://issues.apache.org/jira/browse/MAPREDUCE-3695
Project: Hadoop Map/Reduce
Issue Type: Bug
Components: jobtracker
Affects Versions: 1.0.0, 0.21.0
Reporter: 杨果
Exception occurred when the result of mapreduce insert into oracle except mysql.
[org.apache.hadoop.mapred.Child.main(Child.java:234)] Exception running child : java.io.IOException: ORA-00911: invalid character at org.apache.hadoop.mapreduce.lib.db.DBOutputFormat$DBRecordWriter.close(DBOutputFormat.java:103) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:545) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:385) at org.apache.hadoop.mapred.Child$4.run(Child.java:217) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:742) at org.apache.hadoop.mapred.Child.main(Child.java:211) 2012-01-19 15:41:22 [INFO]-[main]-[org.apache.hadoop.mapred.Task]-[org.apache.hadoop.mapred.Task.taskCleanup(Task.java:996)] Runnning cleanup for the task
The exception in the 161 line of the DBOutputFormat.java,modify as follows and exception fixed.
the reason is more than a semicolon.
public String constructQuery(String table, String[] fieldNames) {
if(fieldNames == null) {
throw new IllegalArgumentException("Field names may not be null");
}
StringBuilder query = new StringBuilder();
query.append("INSERT INTO ").append(table);
if (fieldNames.length > 0 && fieldNames[0] != null) {
query.append(" (");
for (int i = 0; i < fieldNames.length; i++) {
query.append(fieldNames[i]);
if (i != fieldNames.length - 1) {
query.append(",");
}
}
query.append(")");
}
query.append(" VALUES (");
for (int i = 0; i < fieldNames.length; i++) {
query.append("?");
if(i != fieldNames.length - 1) {
query.append(",");
}
}
query.append(");");
return query.toString();
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MAPREDUCE-3695) Error:ORA 00911 invalid
character(the result of mapreduce insert into oracle)
Posted by "杨果 (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAPREDUCE-3695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
杨果 updated MAPREDUCE-3695:
--------------------------
Status: Patch Available (was: Open)
> Error:ORA 00911 invalid character(the result of mapreduce insert into oracle)
> -----------------------------------------------------------------------------
>
> Key: MAPREDUCE-3695
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-3695
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: jobtracker
> Affects Versions: 1.0.0, 0.21.0
> Reporter: 杨果
> Labels: patch
>
> Exception occurred when the result of mapreduce insert into oracle except mysql.
> [org.apache.hadoop.mapred.Child.main(Child.java:234)] Exception running child : java.io.IOException: ORA-00911: invalid character at org.apache.hadoop.mapreduce.lib.db.DBOutputFormat$DBRecordWriter.close(DBOutputFormat.java:103) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:545) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:385) at org.apache.hadoop.mapred.Child$4.run(Child.java:217) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:742) at org.apache.hadoop.mapred.Child.main(Child.java:211) 2012-01-19 15:41:22 [INFO]-[main]-[org.apache.hadoop.mapred.Task]-[org.apache.hadoop.mapred.Task.taskCleanup(Task.java:996)] Runnning cleanup for the task
>
> The exception in the 161 line of the DBOutputFormat.java,modify as follows and exception fixed.
> the reason is more than a semicolon.
> public String constructQuery(String table, String[] fieldNames) {
> if(fieldNames == null) {
> throw new IllegalArgumentException("Field names may not be null");
> }
> StringBuilder query = new StringBuilder();
> query.append("INSERT INTO ").append(table);
> if (fieldNames.length > 0 && fieldNames[0] != null) {
> query.append(" (");
> for (int i = 0; i < fieldNames.length; i++) {
> query.append(fieldNames[i]);
> if (i != fieldNames.length - 1) {
> query.append(",");
> }
> }
> query.append(")");
> }
> query.append(" VALUES (");
> for (int i = 0; i < fieldNames.length; i++) {
> query.append("?");
> if(i != fieldNames.length - 1) {
> query.append(",");
> }
> }
> query.append(");");
> return query.toString();
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MAPREDUCE-3695) Error:ORA 00911 invalid
character(the result of mapreduce insert into oracle)
Posted by "Harsh J (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAPREDUCE-3695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harsh J updated MAPREDUCE-3695:
-------------------------------
Affects Version/s: (was: 1.0.0)
(was: 0.21.0)
2.0.0-alpha
Status: Open (was: Patch Available)
Cancelling 'Patch Available' status as there's no patch available here. Please follow http://wiki.apache.org/hadoop/HowToContribute and provide us a diff-patch against trunk for fixing this! :)
> Error:ORA 00911 invalid character(the result of mapreduce insert into oracle)
> -----------------------------------------------------------------------------
>
> Key: MAPREDUCE-3695
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-3695
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: mrv2
> Affects Versions: 2.0.0-alpha
> Reporter: 杨果
> Labels: patch
>
> Exception occurred when the result of mapreduce insert into oracle except mysql.
> [org.apache.hadoop.mapred.Child.main(Child.java:234)] Exception running child : java.io.IOException: ORA-00911: invalid character at org.apache.hadoop.mapreduce.lib.db.DBOutputFormat$DBRecordWriter.close(DBOutputFormat.java:103) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:545) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:385) at org.apache.hadoop.mapred.Child$4.run(Child.java:217) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:742) at org.apache.hadoop.mapred.Child.main(Child.java:211) 2012-01-19 15:41:22 [INFO]-[main]-[org.apache.hadoop.mapred.Task]-[org.apache.hadoop.mapred.Task.taskCleanup(Task.java:996)] Runnning cleanup for the task
>
> The exception in the 161 line of the DBOutputFormat.java,modify as follows and exception fixed.
> the reason is more than a semicolon.
> public String constructQuery(String table, String[] fieldNames) {
> if(fieldNames == null) {
> throw new IllegalArgumentException("Field names may not be null");
> }
> StringBuilder query = new StringBuilder();
> query.append("INSERT INTO ").append(table);
> if (fieldNames.length > 0 && fieldNames[0] != null) {
> query.append(" (");
> for (int i = 0; i < fieldNames.length; i++) {
> query.append(fieldNames[i]);
> if (i != fieldNames.length - 1) {
> query.append(",");
> }
> }
> query.append(")");
> }
> query.append(" VALUES (");
> for (int i = 0; i < fieldNames.length; i++) {
> query.append("?");
> if(i != fieldNames.length - 1) {
> query.append(",");
> }
> }
> query.append(");");
> return query.toString();
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MAPREDUCE-3695) Error:ORA 00911 invalid
character(the result of mapreduce insert into oracle)
Posted by "Harsh J (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAPREDUCE-3695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harsh J updated MAPREDUCE-3695:
-------------------------------
Component/s: (was: jobtracker)
mrv2
> Error:ORA 00911 invalid character(the result of mapreduce insert into oracle)
> -----------------------------------------------------------------------------
>
> Key: MAPREDUCE-3695
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-3695
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: mrv2
> Affects Versions: 2.0.0-alpha
> Reporter: 杨果
> Labels: patch
>
> Exception occurred when the result of mapreduce insert into oracle except mysql.
> [org.apache.hadoop.mapred.Child.main(Child.java:234)] Exception running child : java.io.IOException: ORA-00911: invalid character at org.apache.hadoop.mapreduce.lib.db.DBOutputFormat$DBRecordWriter.close(DBOutputFormat.java:103) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:545) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:385) at org.apache.hadoop.mapred.Child$4.run(Child.java:217) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:742) at org.apache.hadoop.mapred.Child.main(Child.java:211) 2012-01-19 15:41:22 [INFO]-[main]-[org.apache.hadoop.mapred.Task]-[org.apache.hadoop.mapred.Task.taskCleanup(Task.java:996)] Runnning cleanup for the task
>
> The exception in the 161 line of the DBOutputFormat.java,modify as follows and exception fixed.
> the reason is more than a semicolon.
> public String constructQuery(String table, String[] fieldNames) {
> if(fieldNames == null) {
> throw new IllegalArgumentException("Field names may not be null");
> }
> StringBuilder query = new StringBuilder();
> query.append("INSERT INTO ").append(table);
> if (fieldNames.length > 0 && fieldNames[0] != null) {
> query.append(" (");
> for (int i = 0; i < fieldNames.length; i++) {
> query.append(fieldNames[i]);
> if (i != fieldNames.length - 1) {
> query.append(",");
> }
> }
> query.append(")");
> }
> query.append(" VALUES (");
> for (int i = 0; i < fieldNames.length; i++) {
> query.append("?");
> if(i != fieldNames.length - 1) {
> query.append(",");
> }
> }
> query.append(");");
> return query.toString();
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira