beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (BEAM-4451) SchemaRegistry should support a ServiceLoader interface
Date Mon, 02 Jul 2018 21:15:00 GMT

     [ https://issues.apache.org/jira/browse/BEAM-4451?focusedWorklogId=118399&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-118399
]

ASF GitHub Bot logged work on BEAM-4451:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Jul/18 21:14
            Start Date: 02/Jul/18 21:14
    Worklog Time Spent: 10m 
      Work Description: apilloud commented on a change in pull request #5840: [BEAM-4451]
Schemas default provider and serviceloader
URL: https://github.com/apache/beam/pull/5840#discussion_r199621243
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/SchemaProviderRegistrar.java
 ##########
 @@ -0,0 +1,42 @@
+package org.apache.beam.sdk.schemas;
+
+/*
+ * 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.
+ */
+
+import com.google.auto.service.AutoService;
+import java.util.List;
+import java.util.ServiceLoader;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+
+/**
+ * {@link SchemaProvider} creators have the ability to automatically have their {@link
+ * SchemaProvider schemaProvider} registered with this SDK by creating a {@link ServiceLoader}
entry
+ * and a concrete implementation of this interface.
+ *
+ * <p>It is optional but recommended to use one of the many build time tools such as
{@link
+ * AutoService} to generate the necessary META-INF files automatically.
+ */
+@Experimental(Kind.SCHEMAS)
+public interface SchemaProviderRegistrar {
+  /**
+   * Returns a list of {@link SchemaProvider schema providers} which will be registered by
default
 
 Review comment:
   I'm curious as to why this always returns the providers that are "registered by default"
instead of just the providers that are registered. Why is this extra restriction necessary?

----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 118399)

> SchemaRegistry should support a ServiceLoader interface
> -------------------------------------------------------
>
>                 Key: BEAM-4451
>                 URL: https://issues.apache.org/jira/browse/BEAM-4451
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> This will allow JARs to register schemas only when they are linked in.



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

Mime
View raw message