This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new ff242d028a4 [regression](cloud) Add missing new operator for recycler 
plugin (#37393)
ff242d028a4 is described below

commit ff242d028a4c591bfeec8c4b1d45541133e07731
Author: AlexYue <[email protected]>
AuthorDate: Mon Jul 8 14:19:04 2024 +0800

    [regression](cloud) Add missing new operator for recycler plugin (#37393)
---
 regression-test/framework/pom.xml                      |  6 ++++++
 .../apache/doris/regression/util/ObjectListUtil.groovy | 18 +++++++++++-------
 regression-test/plugins/cloud_recycler_plugin.groovy   |  2 +-
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/regression-test/framework/pom.xml 
b/regression-test/framework/pom.xml
index b689757c5ef..f50e0fa7cfc 100644
--- a/regression-test/framework/pom.xml
+++ b/regression-test/framework/pom.xml
@@ -395,5 +395,11 @@ under the License.
             <artifactId>azure-storage-blob-batch</artifactId>
             <version>12.22.0</version>
         </dependency>
+        <!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-all</artifactId>
+            <version>4.1.104.Final</version>
+        </dependency>
     </dependencies>
 </project>
diff --git 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/ObjectListUtil.groovy
 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/ObjectListUtil.groovy
index 814db47f378..7af745f12e5 100644
--- 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/ObjectListUtil.groovy
+++ 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/ObjectListUtil.groovy
@@ -38,10 +38,11 @@ import com.azure.storage.blob.models.BlobStorageException;
 import com.azure.storage.blob.models.ListBlobsOptions;
 import com.azure.storage.common.StorageSharedKeyCredential;
 
+import java.time.Duration;
 import java.util.Iterator;
 
 interface ListObjectsFileNames {
-    public boolean isEmpty(String tableName, String tableId);
+    public boolean isEmpty(String tableName, String tabletId);
     public Set<String> listObjects(String userName, String userId);
 };
 
@@ -68,7 +69,7 @@ class AwsListObjectsFileNames implements ListObjectsFileNames 
{
                 .withCredentials(new 
AWSStaticCredentialsProvider(credentials)).build()
     }
 
-    public boolean isEmpty(String tableName, String tableId) {
+    public boolean isEmpty(String tableName, String tabletId) {
         def objectListing = s3Client.listObjects(
             new 
ListObjectsRequest().withMaxKeys(1).withBucketName(bucket).withPrefix("${prefix}/data/${tabletId}/"))
 
@@ -124,11 +125,14 @@ class AzureListObjectsFileNames implements 
ListObjectsFileNames {
         this.bucket = bucket;
         this.suite = suite;
         String uri = String.format(URI_TEMPLATE, this.ak, this.bucket);
-            StorageSharedKeyCredential cred = new 
StorageSharedKeyCredential(this.ak, this.sk);
-        this.containerClient = new 
BlobContainerClientBuilder().credential(cred).endpoint(uri).build();
+        StorageSharedKeyCredential cred = new 
StorageSharedKeyCredential(this.ak, this.sk);
+        BlobContainerClientBuilder builder = new BlobContainerClientBuilder();
+        builder.credential(cred);
+        builder.endpoint(uri);
+        this.containerClient = builder.buildClient();
     }
 
-    public boolean isEmpty(String tableName, String tableId) {
+    public boolean isEmpty(String tableName, String tabletId) {
         PagedIterable<BlobItem> blobs = containerClient.listBlobs(
             new ListBlobsOptions()
                 .setPrefix("${prefix}/data/${tabletId}/")
@@ -173,8 +177,8 @@ class ListObjectsFileNamesUtil {
 
     public static ListObjectsFileNames getListObjectsFileNames(String 
provider, String ak, String sk, String endpoint, String region, String prefix, 
String bucket, Suite suite) {
         if (provider.equalsIgnoreCase("azure")) {
-            return AzureListObjectsFileNames(ak, sk, endpoint, region, prefix, 
bucket, suite)
+            return new AzureListObjectsFileNames(ak, sk, endpoint, region, 
prefix, bucket, suite)
         }
-        return AwsListObjectsFileNames(ak, sk, endpoint, region, prefix, 
bucket, suite)
+        return new AwsListObjectsFileNames(ak, sk, endpoint, region, prefix, 
bucket, suite)
     }
 }
\ No newline at end of file
diff --git a/regression-test/plugins/cloud_recycler_plugin.groovy 
b/regression-test/plugins/cloud_recycler_plugin.groovy
index 0282722d040..ed330e94935 100644
--- a/regression-test/plugins/cloud_recycler_plugin.groovy
+++ b/regression-test/plugins/cloud_recycler_plugin.groovy
@@ -79,7 +79,7 @@ Suite.metaClass.checkRecycleTable = { String token, String 
instanceId, String cl
         // def objectListing = s3Client.listObjects(
         //     new 
ListObjectsRequest().withMaxKeys(1).withBucketName(bucket).withPrefix("${prefix}/data/${tabletId}/"))
 
-        suite.getLogger().info("tableName: ${tableName}, tabletId:${tabletId}, 
objectListing:${objectListing.getObjectSummaries()}".toString())
+        // suite.getLogger().info("tableName: ${tableName}, 
tabletId:${tabletId}, 
objectListing:${objectListing.getObjectSummaries()}".toString())
         if (!client.isEmpty(tableName, tabletId)) {
             return false;
         }


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

Reply via email to