[ 
https://issues.apache.org/jira/browse/HADOOP-19508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17936371#comment-17936371
 ] 

ASF GitHub Bot commented on HADOOP-19508:
-----------------------------------------

stoty opened a new pull request, #7520:
URL: https://github.com/apache/hadoop/pull/7520

   ### Description of PR
   
   Set CharsetEncoder in HadoopArchiveLogs so that it works regardless of the 
system charset defaults.
   
   ### How was this patch tested?
   
   On my JDK23 branch, as the failure does not happen on my system, and the CI 
for this PR won't run on Centos 7.
   
   ### For code changes:
   
   - [X] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




> Set charsetEncoder in HadoopArchiveLogs
> ---------------------------------------
>
>                 Key: HADOOP-19508
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19508
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Major
>
> The test for it fails in CI on Centos 7, likely because it has different 
> default charsets than the other CI environments.
> {noformat}
> [ERROR] org.apache.hadoop.tools.TestHadoopArchiveLogs.testGenerateScript  
> Time elapsed: 0.036 s  <<< ERROR!
> java.lang.IllegalStateException: Mismatched Charset(UTF-8) and 
> CharsetEncoder(US-ASCII)
>       at 
> org.apache.commons.io.output.FileWriterWithEncoding$Builder.get(FileWriterWithEncoding.java:113)
>       at 
> org.apache.hadoop.tools.HadoopArchiveLogs.generateScript(HadoopArchiveLogs.java:512)
>       at 
> org.apache.hadoop.tools.TestHadoopArchiveLogs._testGenerateScript(TestHadoopArchiveLogs.java:280)
>       at 
> org.apache.hadoop.tools.TestHadoopArchiveLogs.testGenerateScript(TestHadoopArchiveLogs.java:248)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
>       at 
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at java.lang.Thread.run(Thread.java:750){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to