@@ -167,8 +167,17 @@ public class S3ADiagnosticsInfo extends StoreDiagnosticsInfo {
167167 */
168168 public static final String PREFETCH_BLOCK_COUNT_KEY = "fs.s3a.prefetch.block.count" ;
169169
170+ /**
171+ * Signing.
172+ */
170173 public static final String SIGNING_ALGORITHM = "fs.s3a.signing-algorithm" ;
171174
175+ /**
176+ * Signing; allows use of v2 signing on sdk v1,
177+ * -D fs.s3a.signing-algorithm=S3SignerType
178+ */
179+ public static final String SIGNING_V2_ALGORITHM = "S3SignerType" ;
180+
172181 private static final Object [][] options = {
173182 /* Core auth */
174183 {ACCESS_KEY , true , true },
@@ -721,7 +730,7 @@ protected void validateConfig(final Printout printout,
721730 printout .heading ("Endpoint validation" );
722731 String endpoint = conf .getTrimmed (ENDPOINT , "" ).toLowerCase (Locale .ROOT );
723732 String region = conf .getTrimmed (REGION , "" ).toLowerCase (Locale .ROOT );
724- String signing = conf .getTrimmed (SIGNING_ALGORITHM , "" ). toLowerCase ( Locale . ROOT ) ;
733+ String signing = conf .getTrimmed (SIGNING_ALGORITHM , "" );
725734 String bucket = getFsURI ().getHost ();
726735 boolean privateLink = false ;
727736 boolean isIpv4 = false ;
@@ -732,10 +741,12 @@ protected void validateConfig(final Printout printout,
732741 printout .println ("%s = \" %s\" " , ENDPOINT , endpoint );
733742 printout .println ("%s = \" %s\" " , REGION , region );
734743 printout .println ("%s = \" %s\" " , PATH_STYLE_ACCESS , pathStyleAccess );
735- printout .println ("%s = \" %s\" " , SIGNING_ALGORITHM , pathStyleAccess );
736- printout .println ("%s = \" %s\" " , SECURE_CONNECTIONS , signing );
744+ printout .println ("%s = \" %s\" " , SIGNING_ALGORITHM , signing );
745+ printout .println ("%s = \" %s\" " , SECURE_CONNECTIONS , secureConnections );
737746
738747 boolean isUsingAws = false ;
748+ boolean isUsingV2Signing = SIGNING_V2_ALGORITHM .equals (signing );
749+
739750 if (endpoint .isEmpty ()) {
740751 isUsingAws = true ;
741752 printout .println ("Central us-east endpoint will be used. "
@@ -759,7 +770,7 @@ protected void validateConfig(final Printout printout,
759770 printout .println ("See https://issues.apache.org/jira/browse/HADOOP-17705 for a workaround" );
760771 } else if (!endpoint .contains (".amazonaws." )) {
761772 isUsingAws = false ;
762- printout .println ("This does not appear to be an amazon endpoint, unless it is a VPN addresss ." );
773+ printout .println ("This does not appear to be an amazon endpoint, unless it is a VPN address ." );
763774 isIpv4 = isIpV4String (endpoint );
764775
765776 if (region .isEmpty ()) {
@@ -808,12 +819,24 @@ protected void validateConfig(final Printout printout,
808819 printout .warn ("You should probably set %s to true" , PATH_STYLE_ACCESS );
809820 }
810821 }
811- if (!privateLink && isUsingAws ) {
822+ if (isUsingAws && !privateLink ) {
823+ printout .println ("" );
824+ printout .println ("This client is configured to connect to to AWS S3" );
825+ printout .println ("" );
812826 printout .println ("Important: if you are working with a third party store," );
813- printout .println (" this client is still trying to connect to to AWS S3" );
814827 printout .println ("Expect failure until %s is set to the private endpoint" , ENDPOINT );
815828 }
816829
830+ if (isUsingV2Signing ) {
831+ if (isUsingAws ) {
832+ printout .warn ("The signing algorithm is %s; this is not supported on newer AWS buckets or the v2 AWS SDK" , SIGNING_V2_ALGORITHM );
833+ } else {
834+ printout .println ("The signing algorithm is %s; this is required for some third-party S3 stores" , SIGNING_V2_ALGORITHM );
835+ printout .warn ("The signing algorithm is not yet available through the v2 AWS SDK" );
836+ }
837+ }
838+
839+
817840 printout .heading ("Bucket Name validation" );
818841
819842 printout .println ("bucket name = \" %s\" " , bucket );
0 commit comments