[
https://issues.apache.org/jira/browse/HDDS-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16628324#comment-16628324
]
LiXin Ge commented on HDDS-368:
-------------------------------
Hi [~szetszwo], sorry for the late response here.
bq.Could you also try updating it? Mine is 1.8.0_172.
I have updated my java version to the latest 1.8.0_181, but it didn't work, the
test fails by the same reason:
{noformat}
hadoop@hadoop:/home/glx/hadoop$ mvn -v
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe;
2018-06-18T02:33:14+08:00)
Maven home: /home/maven/apache-maven-3.5.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime:
/home/hadoop/liuhua/hadoop/jdk1.8.0_181/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-116-generic", arch: "amd64", family: "unix"
{noformat}
bq.Do you see a way to fix it?
Sorry I haven't find a way to fix it. The clue is when a "string" is in
response data and the "string".length() is 10 shorter than
"string".getBytes().length, the response data will get 10 bytes lost when it
arrive the client. Seems close to the truth but I'm not HTTP/Rest expert.
> all tests in TestOzoneRestClient failed due to "zh_CN" OS language
> ------------------------------------------------------------------
>
> Key: HDDS-368
> URL: https://issues.apache.org/jira/browse/HDDS-368
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: test
> Affects Versions: 0.2.1
> Reporter: LiXin Ge
> Priority: Critical
> Labels: alpha2
>
> OS: Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-116-generic x86_64)
> java version: 1.8.0_111
> mvn: Apache Maven 3.3.9
> Default locale: zh_CN, platform encoding: UTF-8
> Test command: mvn test -Dtest=TestOzoneRestClient -Phdds
>
> All the tests in TestOzoneRestClient failed in my local machine with
> exception like below, does it mean anybody who have runtime environment like
> me can't run the Ozone Rest test now?
> {noformat}
> [ERROR]
> testCreateBucket(org.apache.hadoop.ozone.client.rest.TestOzoneRestClient)
> Time elapsed: 0.01 s <<< ERROR!
> java.io.IOException: org.apache.hadoop.ozone.client.rest.OzoneException:
> Unparseable date: "m, 28 1970 19:23:50 GMT"
> at
> org.apache.hadoop.ozone.client.rest.RestClient.executeHttpRequest(RestClient.java:853)
> at
> org.apache.hadoop.ozone.client.rest.RestClient.createVolume(RestClient.java:252)
> at
> org.apache.hadoop.ozone.client.rest.RestClient.createVolume(RestClient.java:210)
> at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.apache.hadoop.ozone.client.OzoneClientInvocationHandler.invoke(OzoneClientInvocationHandler.java:54)
> at com.sun.proxy.$Proxy73.createVolume(Unknown Source)
> at
> org.apache.hadoop.ozone.client.ObjectStore.createVolume(ObjectStore.java:66)
> at
> org.apache.hadoop.ozone.client.rest.TestOzoneRestClient.testCreateBucket(TestOzoneRestClient.java:174)
> 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:47)
> Caused by: org.apache.hadoop.ozone.client.rest.OzoneException: Unparseable
> date: "m, 28 1970 19:23:50 GMT"
> at sun.reflect.GeneratedConstructorAccessor27.newInstance(Unknown
> Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at
> com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:119)
> at
> com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createUsingDefault(StdValueInstantiator.java:270)
> at
> com.fasterxml.jackson.databind.deser.std.ThrowableDeserializer.deserializeFromObject(ThrowableDeserializer.java:149)
> at
> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
> at
> com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1611)
> at
> com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1219)
> at
> org.apache.hadoop.ozone.client.rest.OzoneException.parse(OzoneException.java:265)
> ... 39 more
> {noformat}
> or like:
> {noformat}
> [ERROR] Failures:
> [ERROR] TestOzoneRestClient.testDeleteKey
> Expected: exception with message a string containing "Lookup key failed,
> error"
> but: message was "Unexpected end-of-input within/between Object entries
> at [Source: (String)"{
> "owner" : {
> "name" : "hadoop"
> },
> "quota" : {
> "unit" : "TB",
> "size" : 1048576
> },
> "volumeName" : "f93ed82d-dff6-4b75-a1c5-6a0fef5aa6dd",
> "createdOn" : "���, 06 ��� +50611 08:28:21 GMT",
> "createdBy" "; line: 11, column: 251]"
> Stacktrace was: com.fasterxml.jackson.core.io.JsonEOFException: Unexpected
> end-of-input within/between Object entries
> at [Source: (String)"{
> "owner" : {
> "name" : "hadoop"
> },
> "quota" : {
> "unit" : "TB",
> "size" : 1048576
> },
> "volumeName" : "f93ed82d-dff6-4b75-a1c5-6a0fef5aa6dd",
> "createdOn" : "���, 06 ��� +50611 08:28:21 GMT",
> "createdBy" "; line: 11, column: 251]
> at
> com.fasterxml.jackson.core.base.ParserMinimalBase._reportInvalidEOF(ParserMinimalBase.java:588)
> at
> com.fasterxml.jackson.core.json.ReaderBasedJsonParser._skipColon2(ReaderBasedJsonParser.java:2214)
> at
> com.fasterxml.jackson.core.json.ReaderBasedJsonParser._skipColon(ReaderBasedJsonParser.java:2129)
> at
> com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextFieldName(ReaderBasedJsonParser.java:910)
> at
> com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:295)
> at
> com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
> at
> com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1611)
> at
> com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1219)
> at
> org.apache.hadoop.ozone.client.rest.response.VolumeInfo.parse(VolumeInfo.java:178)
> at
> org.apache.hadoop.ozone.client.rest.RestClient.getVolumeDetails(RestClient.java:307)
> 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.apache.hadoop.ozone.client.OzoneClientInvocationHandler.invoke(OzoneClientInvocationHandler.java:54)
> at com.sun.proxy.$Proxy73.getVolumeDetails(Unknown Source)
> at
> org.apache.hadoop.ozone.client.ObjectStore.getVolume(ObjectStore.java:87)
> at
> org.apache.hadoop.ozone.client.rest.TestOzoneRestClient.testDeleteKey(TestOzoneRestClient.java:378)
> 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)
> {noformat}
> I have tried to change the {{Locale}} of {{SimpleDateFormat}} to
> {{Locale.CHINESE}} or {{Locale.SIMPLIFIED_CHINESE}}, but it didn't work.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]