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

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

                Author: ASF GitHub Bot
            Created on: 29/Jun/18 04:07
            Start Date: 29/Jun/18 04:07
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on a change in pull request #5545: 
[BEAM-4076] Import Schema branch into master
URL: https://github.com/apache/beam/pull/5545#discussion_r199048517
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/SchemaRegistry.java
 ##########
 @@ -0,0 +1,156 @@
+/*
+ * 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.beam.sdk.schemas;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.transforms.SerializableFunction;
+import org.apache.beam.sdk.values.Row;
+import org.apache.beam.sdk.values.TypeDescriptor;
+
+/**
+ * A {@link SchemaRegistry} allows registering {@link Schema}s for a given 
Java {@link Class} or a
+ * {@link TypeDescriptor}.
+ *
+ * <p>Types registered in a pipeline's schema registry will automatically be 
discovered by any
+ * {@link org.apache.beam.sdk.values.PCollection} that uses {@link 
SchemaCoder}. This allows users
+ * to write pipelines in terms of their own Java types, yet still register 
schemas for these types.
+ *
+ * <p>TODO: Provide support for schemas registered via a ServiceLoader 
interface. This will allow
+ * optional modules to register schemas as well.
+ */
+@Experimental(Kind.SCHEMAS)
+public class SchemaRegistry {
+  private static class SchemaEntry<T> {
+    Schema schema;
 
 Review comment:
   AutoValue overkill here - made them final

----------------------------------------------------------------
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 117188)
    Time Spent: 5h 50m  (was: 5h 40m)

> Schema followups
> ----------------
>
>                 Key: BEAM-4076
>                 URL: https://issues.apache.org/jira/browse/BEAM-4076
>             Project: Beam
>          Issue Type: Improvement
>          Components: beam-model, dsl-sql, sdk-java-core
>            Reporter: Kenneth Knowles
>            Priority: Major
>          Time Spent: 5h 50m
>  Remaining Estimate: 0h
>
> This umbrella bug contains subtasks with followups for Beam schemas, which 
> were moved from SQL to the core Java SDK and made to be type-name-based 
> rather than coder based.



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

Reply via email to