[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-09 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r765927653



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/AgentRepositories.java
##
@@ -0,0 +1,51 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+
+@ApiModel
+public class AgentRepositories implements Serializable {
+private static final long serialVersionUID = 6350263064169212602L;
+
+private AgentRepositoryStatus flowfile;
+private AgentRepositoryStatus provenance;

Review comment:
   Will revert




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-09 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r765883730



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/SystemInfo.java
##
@@ -0,0 +1,137 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.util.Objects;
+
+@ApiModel
+public class SystemInfo implements Serializable {
+private static final long serialVersionUID = 830834593998474779L;
+
+public static final int MACHINE_ARCH_MAX_SIZE = 100;
+public static final int OS_MAX_SIZE = 100;
+
+@Size(max = MACHINE_ARCH_MAX_SIZE)
+@ApiModelProperty("Machine architecture of the device, e.g., ARM, x86")
+private String machineArch;
+
+@Size(max = OS_MAX_SIZE)
+private String operatingSystem;
+
+@Min(0)
+@Max(Long.MAX_VALUE)
+@ApiModelProperty(value = "Size of physical memory of the device in 
bytes", allowableValues = "range[0, 9223372036854775807]")
+private Long physicalMem;
+
+@Min(0)
+@Max(Integer.MAX_VALUE)
+@ApiModelProperty(
+value = "Number of virtual cores on the device",
+name = "vCores",
+allowableValues = "range[0, 2147483647]")
+private Integer vCores;

Review comment:
   @exceptionfactory What are your thoughts on this?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-09 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r765753800



##
File path: 
nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-hadoop-record-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractPutHDFSRecord.java
##
@@ -279,8 +279,18 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
 createDirectory(fileSystem, directoryPath, remoteOwner, 
remoteGroup);
 
 // write to tempFile first and on success rename to destFile
-final Path tempFile = new Path(directoryPath, "." + 
filenameValue);
-final Path destFile = new Path(directoryPath, filenameValue);
+final Path tempFile = new Path(directoryPath, "." + 
filenameValue) {

Review comment:
   Yes I think I had another PR's changes in mine at the same time, will 
check. Great catch!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-09 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r765753082



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/SystemInfo.java
##
@@ -0,0 +1,137 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.util.Objects;
+
+@ApiModel
+public class SystemInfo implements Serializable {
+private static final long serialVersionUID = 830834593998474779L;
+
+public static final int MACHINE_ARCH_MAX_SIZE = 100;
+public static final int OS_MAX_SIZE = 100;
+
+@Size(max = MACHINE_ARCH_MAX_SIZE)
+@ApiModelProperty("Machine architecture of the device, e.g., ARM, x86")
+private String machineArch;
+
+@Size(max = OS_MAX_SIZE)
+private String operatingSystem;
+
+@Min(0)
+@Max(Long.MAX_VALUE)
+@ApiModelProperty(value = "Size of physical memory of the device in 
bytes", allowableValues = "range[0, 9223372036854775807]")
+private Long physicalMem;
+
+@Min(0)
+@Max(Integer.MAX_VALUE)
+@ApiModelProperty(
+value = "Number of virtual cores on the device",
+name = "vCores",
+allowableValues = "range[0, 2147483647]")
+private Integer vCores;

Review comment:
   Good catch, also leftover from JAXB annotations, will change to 
primitives




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764205345



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/AgentRepositoryStatus.java
##
@@ -0,0 +1,112 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.xml.bind.annotation.XmlTransient;
+
+@ApiModel
+public class AgentRepositoryStatus implements Serializable {
+private static final long serialVersionUID = 6563881979096175411L;
+
+@Min(0)
+@Max(Long.MAX_VALUE)
+private Long size;
+
+@Min(0)
+@Max(Long.MAX_VALUE)
+private Long sizeMax;
+
+@Min(0)
+@Max(Long.MAX_VALUE)
+private Long dataSize;
+
+@Min(0)
+@Max(Long.MAX_VALUE)
+private Long dataSizeMax;
+
+@ApiModelProperty(value = "The number of items in the repository", 
allowableValues = "range[0, 9223372036854775807]")
+public Long getSize() {
+return size;
+}
+
+public void setSize(Long size) {
+this.size = size;
+}
+
+@ApiModelProperty(value = "The maximum number of items the repository is 
capable of storing", allowableValues = "range[0, 9223372036854775807]")
+public Long getSizeMax() {
+return sizeMax;
+}
+
+public void setSizeMax(Long sizeMax) {
+this.sizeMax = sizeMax;
+}
+
+@ApiModelProperty(value = "The data size (in Bytes) of all items in the 
repository", allowableValues = "range[0, 9223372036854775807]")
+public Long getDataSize() {
+return dataSize;
+}
+
+public void setDataSize(Long dataSize) {
+this.dataSize = dataSize;
+}
+
+@ApiModelProperty(value = "The maximum data size (in Bytes) that the 
repository is capable of storing", allowableValues = "range[0, 
9223372036854775807]")
+public Long getDataSizeMax() {
+return dataSizeMax;
+}
+
+public void setDataSizeMax(Long dataSizeMax) {
+this.dataSizeMax = dataSizeMax;
+}
+
+/**
+ * If sizeMax is set, returns a decimal between [0, 1] indicating the ratio
+ * of size to sizeMax.
+ * 
+ * If size or sizeMax are null, this method return null.
+ *
+ * @return a decimal between [0, 1] representing the sizeMax utilization 
percentage
+ */
+@XmlTransient

Review comment:
   Serialized yes, XML optionally




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764204510



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/AgentRepositoryStatus.java
##
@@ -0,0 +1,112 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.xml.bind.annotation.XmlTransient;
+
+@ApiModel
+public class AgentRepositoryStatus implements Serializable {
+private static final long serialVersionUID = 6563881979096175411L;
+
+@Min(0)
+@Max(Long.MAX_VALUE)
+private Long size;

Review comment:
   These are used like the Serializable interface to support 
caching/serialization, but if we can do it better I'm all for it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764202621



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/AgentInfo.java
##
@@ -0,0 +1,88 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import javax.validation.constraints.NotBlank;
+
+@ApiModel
+public class AgentInfo implements Serializable {
+private static final long serialVersionUID = -8812289319080770084L;

Review comment:
   I think we may want to enable a caching solution for these POJOs 
someday, so I'm thinking we could keep them in and set the versions to 1?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764201954



##
File path: c2/c2-protocol/c2-protocol-api/pom.xml
##
@@ -0,0 +1,38 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+4.0.0
+
+
+c2-protocol
+org.apache.nifi
+1.16.0-SNAPSHOT
+
+
+c2-protocol-api

Review comment:
   I envision this module being used by anyone that wants a straightforward 
solution to C2, so I'd like to keep it not specific to NiFi and keep the name 
without the prefix to strengthen that point.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764181870



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/NetworkInfo.java
##
@@ -0,0 +1,69 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import javax.validation.constraints.Size;
+
+@ApiModel
+public class NetworkInfo implements Serializable {
+private static final long serialVersionUID = 6574362622904811901L;
+
+public static final int DEVICE_ID_SIZE = 200;
+public static final int IP_ADDRESS_MAX_SIZE = 45;

Review comment:
   Nope, just forethought in case they're needed, I can make them private 
for now if they're unused elsewhere.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764175514



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/C2Heartbeat.java
##
@@ -0,0 +1,160 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlTransient;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+/**
+ * TODO add Builder interface
+ */
+@ApiModel
+public class C2Heartbeat implements Serializable {
+private static final long serialVersionUID = -1168790962754919591L;
+
+// Internal, not part of REST API
+private String identifier;
+private Long created;

Review comment:
   I think only because we know it will be serialized since it's part of 
the protocol. If using date/time classes is more readable/maintainable, I can 
use those instead.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764161218



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/AgentInfo.java
##
@@ -0,0 +1,88 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation
+ *
+ * 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.c2.protocol.api;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import javax.validation.constraints.NotBlank;
+
+@ApiModel
+public class AgentInfo implements Serializable {
+private static final long serialVersionUID = -8812289319080770084L;

Review comment:
   I'm not sure if `Serializable` _needs_ to be used, I saw an example and 
did a copy-paste. Does swagger need it? If not then maybe they can be removed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764160512



##
File path: 
c2/c2-protocol/c2-protocol-api/src/main/java/org/apache/nifi/c2/protocol/api/AgentInfo.java
##
@@ -0,0 +1,88 @@
+/*
+ * Apache NiFi - MiNiFi
+ * Copyright 2014-2018 The Apache Software Foundation

Review comment:
   Ok will try a sweeping removal :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [nifi] mattyb149 commented on a change in pull request #5563: NIFI-9430: Create initial C2 structure, add c2-protocol-api module

2021-12-07 Thread GitBox


mattyb149 commented on a change in pull request #5563:
URL: https://github.com/apache/nifi/pull/5563#discussion_r764159872



##
File path: c2/c2-protocol/c2-protocol-api/pom.xml
##
@@ -0,0 +1,38 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+4.0.0
+
+
+c2-protocol
+org.apache.nifi
+1.16.0-SNAPSHOT
+
+
+c2-protocol-api

Review comment:
   Since we have `nifi` in the group name and the C2 modules are meant to 
be used by NiFi but not strictly tied to it, I'd like to keep it just `c2` like 
we do with `minifi`, unless there are strong objections?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org