pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] ivankelly commented on a change in pull request #2865: Refactored JCloud Tiered Storage
Date Wed, 31 Oct 2018 09:52:29 GMT
ivankelly commented on a change in pull request #2865: Refactored JCloud Tiered Storage
URL: https://github.com/apache/pulsar/pull/2865#discussion_r229619233
 
 

 ##########
 File path: tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/TieredStorageConfiguration.java
 ##########
 @@ -0,0 +1,212 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.bookkeeper.mledger.offload.jcloud.provider;
+
+import com.google.common.collect.ImmutableMap;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.stream.Collectors;
+
+import org.jclouds.Constants;
+import org.jclouds.blobstore.BlobStore;
+import org.jclouds.domain.Credentials;
+import org.jclouds.providers.ProviderMetadata;
+
+/**
+ * Class responsible for holding all of the tiered storage configuration data
+ * that is set in the global Pulsar broker.conf file.
+ * <p>
+ * This class is used by the BlobStoreManagedLedgerOffloader to determine which
+ * JCloud provider to use for Tiered Storage offloand, along with the associated
+ * properties such as region, bucket, user credentials, etc.
+ * </p>
+ */
+public class TieredStorageConfiguration implements Serializable, Cloneable {
+
+    private static final long serialVersionUID = 1L;
+    public static final String BLOB_STORE_PROVIDER_KEY = "managedLedgerOffloadDriver";
+    public static final String METADATA_FIELD_BLOB_STORE_PROVIDER = "provider";
+    public static final String METADATA_FIELD_BUCKET = "bucket";
+    public static final String METADATA_FIELD_REGION = "region";
+    public static final String METADATA_FIELD_ENDPOINT = "endpoint";
+    protected static final int MB = 1024 * 1024;
+
+    public static TieredStorageConfiguration create(Properties props) throws IOException
{
 
 Review comment:
   These properties ultimitely come from the broker.conf. There's no property "bucket", or
"region" there. The fields are like "s3ManagedLedgerOffloadBucket" etc. moreover, changing
the field name breaks BC, but I don't think you meant to anyhow.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message