hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-15953) AliyunOSS: exception will be thrown if set fs.oss.credentials.provider to AliyunCredentialsProvider
Date Tue, 27 Nov 2018 16:28:00 GMT

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

Hadoop QA commented on HADOOP-15953:
------------------------------------

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 14s{color} | {color:blue}
Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  0s{color} |
{color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m  0s{color}
| {color:green} The patch appears to include 1 new or modified test files. {color} |
|| || || || {color:brown} trunk Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 24m 39s{color}
| {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 23s{color} |
{color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 19s{color}
| {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 25s{color} |
{color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 12m 50s{color}
| {color:green} branch has no errors when building and testing our client artifacts. {color}
|
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  0m 34s{color} |
{color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 21s{color} |
{color:green} trunk passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 21s{color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 17s{color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 17s{color} | {color:green}
the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  0m 11s{color}
| {color:orange} hadoop-tools/hadoop-aliyun: The patch generated 1 new + 0 unchanged - 0 fixed
= 1 total (was 0) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 20s{color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m  0s{color}
| {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 13m 32s{color}
| {color:green} patch has no errors when building and testing our client artifacts. {color}
|
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  0m 38s{color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 17s{color} |
{color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m 22s{color} | {color:green}
hadoop-aliyun in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 31s{color}
| {color:green} The patch does not generate ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 56m 37s{color} | {color:black}
{color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:8f97d6f |
| JIRA Issue | HADOOP-15953 |
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12949697/HADOOP-15953.001.patch
|
| Optional Tests |  dupname  asflicense  compile  javac  javadoc  mvninstall  mvnsite  unit
 shadedclient  findbugs  checkstyle  |
| uname | Linux 2c37e0268432 4.4.0-134-generic #160~14.04.1-Ubuntu SMP Fri Aug 17 11:07:07
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/patchprocess/precommit/personality/provided.sh |
| git revision | trunk / 96c104d |
| maven | version: Apache Maven 3.3.9 |
| Default Java | 1.8.0_181 |
| findbugs | v3.1.0-RC1 |
| checkstyle | https://builds.apache.org/job/PreCommit-HADOOP-Build/15569/artifact/out/diff-checkstyle-hadoop-tools_hadoop-aliyun.txt
|
|  Test Results | https://builds.apache.org/job/PreCommit-HADOOP-Build/15569/testReport/ |
| Max. process+thread count | 341 (vs. ulimit of 10000) |
| modules | C: hadoop-tools/hadoop-aliyun U: hadoop-tools/hadoop-aliyun |
| Console output | https://builds.apache.org/job/PreCommit-HADOOP-Build/15569/console |
| Powered by | Apache Yetus 0.8.0   http://yetus.apache.org |


This message was automatically generated.



> AliyunOSS: exception will be thrown if set fs.oss.credentials.provider to AliyunCredentialsProvider
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-15953
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15953
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/oss
>    Affects Versions: 2.10.0, 3.2.0, 2.9.2, 3.0.3, 3.3.0, 3.1.2
>            Reporter: wujinhu
>            Assignee: wujinhu
>            Priority: Major
>         Attachments: HADOOP-15953.001.patch
>
>
> Hadoop aliyun module uses AliyunCredentialsProvider as default CredentialsProvider
if user do not set fs.oss.credentials.provider. However, if user set fs.oss.credentials.provider
to org.apache.hadoop.fs.aliyun.oss.AliyunCredentialsProvider, exception will be thrown like
below:
>  
> {code:java}
> java.io.IOException: org.apache.hadoop.fs.aliyun.oss.AliyunCredentialsProvider constructor
exception. A class specified in fs.oss.credentials.provider must provide an accessible constructor
accepting URI and Configuration, or an accessible default constructor.
>  at org.apache.hadoop.fs.aliyun.oss.AliyunOSSUtils.getCredentialsProvider(AliyunOSSUtils.java:131)
>  at org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystemStore.initialize(AliyunOSSFileSystemStore.java:154)
>  at org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem.initialize(AliyunOSSFileSystem.java:344)
>  at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3302)
>  at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:124)
>  at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3351)
>  at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3319)
>  at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:479)
>  at org.apache.hadoop.fs.contract.AbstractBondedFSContract.init(AbstractBondedFSContract.java:72)
>  at org.apache.hadoop.fs.contract.AbstractFSContractTestBase.setup(AbstractFSContractTestBase.java:177)
>  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:50)
>  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>  at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>  at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
>  at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>  at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
>  at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
>  at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NoSuchMethodException: org.apache.hadoop.fs.aliyun.oss.AliyunCredentialsProvider.<init>()
>  at java.lang.Class.getConstructor0(Class.java:3082)
>  at java.lang.Class.getDeclaredConstructor(Class.java:2178)
>  at org.apache.hadoop.fs.aliyun.oss.AliyunOSSUtils.getCredentialsProvider(AliyunOSSUtils.java:125)
>  ... 23 more
> {code}
> Because AliyunCredentialsProvider does not have corresponding constructor.
> {code:java}
> public class AliyunCredentialsProvider implements CredentialsProvider {
>   private Credentials credentials = null;
>   public AliyunCredentialsProvider(Configuration conf) throws IOException {
> --------------------------------------------------
> String className = conf.getTrimmed(CREDENTIALS_PROVIDER_KEY);
> if (StringUtils.isEmpty(className)) {
>   Configuration newConf =
>       ProviderUtils.excludeIncompatibleCredentialProviders(conf,
>           AliyunOSSFileSystem.class);
>   credentials = new AliyunCredentialsProvider(newConf);
> } else {
>   try {
>     LOG.debug("Credential provider class is:" + className);
>     Class<?> credClass = Class.forName(className);
>     try {
>       credentials =
>           (CredentialsProvider)credClass.getDeclaredConstructor(
>               URI.class, Configuration.class).newInstance(uri, conf);
>     } catch (NoSuchMethodException | SecurityException e) {
>       credentials =
>           (CredentialsProvider)credClass.getDeclaredConstructor()
>           .newInstance();
>     }
>   } catch (ClassNotFoundException e) {
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message