You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by markap14 <gi...@git.apache.org> on 2017/04/27 13:02:32 UTC

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

GitHub user markap14 opened a pull request:

    https://github.com/apache/nifi/pull/1706

    NIFI-3717: Added HortonworksSchemaRegistry

    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/markap14/nifi NIFI-3717-Rebased

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1706.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1706
    
----
commit e25e84156083d9de365458ebdce52a260bc2d486
Author: Mark Payne <ma...@hotmail.com>
Date:   2017-04-26T17:58:00Z

    NIFI-3717: Added HortonworksSchemaRegistry

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1706#discussion_r113748928
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-nar/pom.xml ---
    @@ -0,0 +1,39 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!-- 
    +    Copyright 2016 Hortoworks, Inc. All rights reserved. 
    --- End diff --
    
    this is not correct.  This is apache nifi code.  This header would only make sense if we're copying source from hortonworks repos.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by markap14 <gi...@git.apache.org>.
Github user markap14 closed the pull request at:

    https://github.com/apache/nifi/pull/1706


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by markap14 <gi...@git.apache.org>.
Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1706#discussion_r113759624
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-nar/pom.xml ---
    @@ -0,0 +1,39 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!-- 
    +    Copyright 2016 Hortoworks, Inc. All rights reserved. 
    --- End diff --
    
    Sorry - you're right. I fixed this in all my java code but forgot that this stuff automatically gets added to XML files and the like as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on the issue:

    https://github.com/apache/nifi/pull/1706
  
    i'm fine with the name and see your point.  I've updated the L&N a bit but honestly that was really darn close so thanks!  I've done the full clean/build contrib check and tested against a live schema registry instance.  Very cool.  I was able to stream provenance events through and convert them between formats with minimal thought and at high rates.  That is awesome. +1 will merge to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1706#discussion_r113750097
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/resources/META-INF/services/org.apache.nifi.controller.ControllerService ---
    @@ -0,0 +1,12 @@
    +#  Copyright 2016 Hortoworks, Inc. All rights reserved. 
    --- End diff --
    
    this is not the correct source header.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1706#discussion_r113749822
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java ---
    @@ -0,0 +1,323 @@
    +/*
    + * 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.nifi.schemaregistry.hortonworks;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.EnumSet;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.ConcurrentMap;
    +import java.util.stream.Collectors;
    +
    +import org.apache.avro.LogicalType;
    +import org.apache.avro.Schema;
    +import org.apache.avro.Schema.Field;
    +import org.apache.avro.Schema.Type;
    +import org.apache.nifi.annotation.documentation.CapabilityDescription;
    +import org.apache.nifi.annotation.documentation.Tags;
    +import org.apache.nifi.annotation.lifecycle.OnDisabled;
    +import org.apache.nifi.annotation.lifecycle.OnEnabled;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.controller.AbstractControllerService;
    +import org.apache.nifi.controller.ConfigurationContext;
    +import org.apache.nifi.processor.util.StandardValidators;
    +import org.apache.nifi.reporting.InitializationException;
    +import org.apache.nifi.schema.access.SchemaField;
    +import org.apache.nifi.schemaregistry.services.SchemaRegistry;
    +import org.apache.nifi.serialization.SimpleRecordSchema;
    +import org.apache.nifi.serialization.record.DataType;
    +import org.apache.nifi.serialization.record.RecordField;
    +import org.apache.nifi.serialization.record.RecordFieldType;
    +import org.apache.nifi.serialization.record.RecordSchema;
    +import org.apache.nifi.serialization.record.SchemaIdentifier;
    +import org.apache.nifi.util.Tuple;
    +
    +import com.hortonworks.registries.schemaregistry.SchemaMetadata;
    +import com.hortonworks.registries.schemaregistry.SchemaMetadataInfo;
    +import com.hortonworks.registries.schemaregistry.SchemaVersionInfo;
    +import com.hortonworks.registries.schemaregistry.SchemaVersionKey;
    +import com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient;
    +import com.hortonworks.registries.schemaregistry.errors.SchemaNotFoundException;
    +
    +@Tags({"schema", "registry", "avro", "hortonworks", "hwx"})
    +@CapabilityDescription("Provides a Schema Registry Service that interacts with a Hortonworks Schema Registry")
    +public class HortonworksSchemaRegistry extends AbstractControllerService implements SchemaRegistry {
    --- End diff --
    
    Do you think perhaps this makes more sense as 'HortonworksSchemaRegistryClient' ?    The name without it sort of implies this IS the hortonworks schema registry.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1706#discussion_r113749519
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/pom.xml ---
    @@ -0,0 +1,195 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!-- 
    +    Copyright 2016 Hortoworks, Inc. All rights reserved. 
    --- End diff --
    
    must fix this to be the proper apache nifi header.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on the issue:

    https://github.com/apache/nifi/pull/1706
  
    [INFO] --- maven-checkstyle-plugin:2.15:check (check-style) @ nifi-hwx-schema-registry-service ---
    [WARNING] src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java[103:9] (whitespace) FileTabCharacter: Line contains a tab character.
    [WARNING] src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java[217:8] (javadoc) JavadocMethod: Unused @param tag for 'schemaName'.
    [INFO] ------------------------------------------------------------------------



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi issue #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by markap14 <gi...@git.apache.org>.
Github user markap14 commented on the issue:

    https://github.com/apache/nifi/pull/1706
  
    @joewitt I think I've addressed all of the comments above, except for the naming. Let me know if you think we need to change the class name.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by markap14 <gi...@git.apache.org>.
Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1706#discussion_r113762440
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java ---
    @@ -0,0 +1,323 @@
    +/*
    + * 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.nifi.schemaregistry.hortonworks;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.EnumSet;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.ConcurrentMap;
    +import java.util.stream.Collectors;
    +
    +import org.apache.avro.LogicalType;
    +import org.apache.avro.Schema;
    +import org.apache.avro.Schema.Field;
    +import org.apache.avro.Schema.Type;
    +import org.apache.nifi.annotation.documentation.CapabilityDescription;
    +import org.apache.nifi.annotation.documentation.Tags;
    +import org.apache.nifi.annotation.lifecycle.OnDisabled;
    +import org.apache.nifi.annotation.lifecycle.OnEnabled;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.controller.AbstractControllerService;
    +import org.apache.nifi.controller.ConfigurationContext;
    +import org.apache.nifi.processor.util.StandardValidators;
    +import org.apache.nifi.reporting.InitializationException;
    +import org.apache.nifi.schema.access.SchemaField;
    +import org.apache.nifi.schemaregistry.services.SchemaRegistry;
    +import org.apache.nifi.serialization.SimpleRecordSchema;
    +import org.apache.nifi.serialization.record.DataType;
    +import org.apache.nifi.serialization.record.RecordField;
    +import org.apache.nifi.serialization.record.RecordFieldType;
    +import org.apache.nifi.serialization.record.RecordSchema;
    +import org.apache.nifi.serialization.record.SchemaIdentifier;
    +import org.apache.nifi.util.Tuple;
    +
    +import com.hortonworks.registries.schemaregistry.SchemaMetadata;
    +import com.hortonworks.registries.schemaregistry.SchemaMetadataInfo;
    +import com.hortonworks.registries.schemaregistry.SchemaVersionInfo;
    +import com.hortonworks.registries.schemaregistry.SchemaVersionKey;
    +import com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient;
    +import com.hortonworks.registries.schemaregistry.errors.SchemaNotFoundException;
    +
    +@Tags({"schema", "registry", "avro", "hortonworks", "hwx"})
    +@CapabilityDescription("Provides a Schema Registry Service that interacts with a Hortonworks Schema Registry")
    +public class HortonworksSchemaRegistry extends AbstractControllerService implements SchemaRegistry {
    --- End diff --
    
    I could see either way. As a user, I think of myself referencing the service as if it were the Hortonworks Schema Registry itself.... we could change it if you feel it's necessary.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi pull request #1706: NIFI-3717: Added HortonworksSchemaRegistry

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1706#discussion_r113749967
  
    --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-hwx-schema-registry-bundle/nifi-hwx-schema-registry-service/src/main/java/org/apache/nifi/schemaregistry/hortonworks/HortonworksSchemaRegistry.java ---
    @@ -0,0 +1,323 @@
    +/*
    + * 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.nifi.schemaregistry.hortonworks;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.EnumSet;
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.ConcurrentMap;
    +import java.util.stream.Collectors;
    +
    +import org.apache.avro.LogicalType;
    +import org.apache.avro.Schema;
    +import org.apache.avro.Schema.Field;
    +import org.apache.avro.Schema.Type;
    +import org.apache.nifi.annotation.documentation.CapabilityDescription;
    +import org.apache.nifi.annotation.documentation.Tags;
    +import org.apache.nifi.annotation.lifecycle.OnDisabled;
    +import org.apache.nifi.annotation.lifecycle.OnEnabled;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.controller.AbstractControllerService;
    +import org.apache.nifi.controller.ConfigurationContext;
    +import org.apache.nifi.processor.util.StandardValidators;
    +import org.apache.nifi.reporting.InitializationException;
    +import org.apache.nifi.schema.access.SchemaField;
    +import org.apache.nifi.schemaregistry.services.SchemaRegistry;
    +import org.apache.nifi.serialization.SimpleRecordSchema;
    +import org.apache.nifi.serialization.record.DataType;
    +import org.apache.nifi.serialization.record.RecordField;
    +import org.apache.nifi.serialization.record.RecordFieldType;
    +import org.apache.nifi.serialization.record.RecordSchema;
    +import org.apache.nifi.serialization.record.SchemaIdentifier;
    +import org.apache.nifi.util.Tuple;
    +
    +import com.hortonworks.registries.schemaregistry.SchemaMetadata;
    +import com.hortonworks.registries.schemaregistry.SchemaMetadataInfo;
    +import com.hortonworks.registries.schemaregistry.SchemaVersionInfo;
    +import com.hortonworks.registries.schemaregistry.SchemaVersionKey;
    +import com.hortonworks.registries.schemaregistry.client.SchemaRegistryClient;
    +import com.hortonworks.registries.schemaregistry.errors.SchemaNotFoundException;
    +
    +@Tags({"schema", "registry", "avro", "hortonworks", "hwx"})
    +@CapabilityDescription("Provides a Schema Registry Service that interacts with a Hortonworks Schema Registry")
    --- End diff --
    
    i think we should link to the github page for the hwx schema registry project here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---