From 92aabcd31bf2c2e7a94d6f9b39d57d2b72a2232a Mon Sep 17 00:00:00 2001 From: Tim <50115603+bossenti@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:00:03 +0100 Subject: [PATCH] refactor: remove dead data lake model classes (#2671) --- .../model/datalake/DataLakeConfiguration.java | 79 ------------------- .../datalake/DataLakeRetentionPolicy.java | 77 ------------------ .../model/datalake/LabelDefinition.java | 46 ----------- .../model/datalake/PersistedDataStream.java | 71 ----------------- 4 files changed, 273 deletions(-) delete mode 100644 streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeConfiguration.java delete mode 100644 streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeRetentionPolicy.java delete mode 100644 streampipes-model/src/main/java/org/apache/streampipes/model/datalake/LabelDefinition.java delete mode 100644 streampipes-model/src/main/java/org/apache/streampipes/model/datalake/PersistedDataStream.java diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeConfiguration.java b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeConfiguration.java deleted file mode 100644 index a36e057884..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeConfiguration.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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.streampipes.model.datalake; - -import java.util.ArrayList; -import java.util.List; - -public class DataLakeConfiguration { - - private Integer batchSize; - private Integer flushDuration; - - private List retentionPolicies; - - public DataLakeConfiguration() { - this.batchSize = 2000; - this.flushDuration = 500; - this.retentionPolicies = new ArrayList(); - } - - public DataLakeConfiguration(List retentionPolicies) { - this.batchSize = 2000; - this.flushDuration = 500; - this.retentionPolicies = retentionPolicies; - } - - public DataLakeConfiguration(Integer batchSize, Integer flushDuration) { - this.batchSize = batchSize; - this.flushDuration = flushDuration; - this.retentionPolicies = new ArrayList(); - } - - public DataLakeConfiguration(Integer batchSize, Integer flushDuration, - List retentionPolicies) { - this.batchSize = batchSize; - this.flushDuration = flushDuration; - this.retentionPolicies = retentionPolicies; - } - - public List getRetentionPolicies() { - return retentionPolicies; - } - - public void setRetentionPolicies(List retentionPolicies) { - this.retentionPolicies = retentionPolicies; - } - - public Integer getBatchSize() { - return batchSize; - } - - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - public Integer getFlushDuration() { - return flushDuration; - } - - public void setFlushDuration(Integer flushDuration) { - this.flushDuration = flushDuration; - } -} diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeRetentionPolicy.java b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeRetentionPolicy.java deleted file mode 100644 index bcff21c9af..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/DataLakeRetentionPolicy.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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.streampipes.model.datalake; - -public class DataLakeRetentionPolicy { - - private String name; - private String durationLiteral; - private boolean isDefault; - - public DataLakeRetentionPolicy(String name, int duration, String durationUnit, boolean isDefault) { - this.name = name; - this.durationLiteral = duration + durationUnit; - this.isDefault = isDefault; - } - - public DataLakeRetentionPolicy(String name) { - this.name = name; - this.isDefault = false; - setDurationLiteralToInfinity(); - } - - public DataLakeRetentionPolicy(String name, String durationLiteral, boolean isDefault) { - this.name = name; - this.durationLiteral = durationLiteral; - this.isDefault = isDefault; - } - - public String getDurationLiteral() { - return durationLiteral; - } - - public void setDurationLiteral(int duration, String durationUnit) { - this.durationLiteral = duration + durationUnit; - } - - public void setDurationLiteralToInfinity() { - this.durationLiteral = "INF"; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public boolean isDefault() { - return isDefault; - } - - public void setDefault(boolean isDefault) { - this.isDefault = isDefault; - } - - @Override - public String toString() { - return String.format("DataLakeRetentionPolicy{name='%s', durationLiteral='%s'}", name, durationLiteral); - } -} diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/LabelDefinition.java b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/LabelDefinition.java deleted file mode 100644 index 3f9dc9e976..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/LabelDefinition.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.streampipes.model.datalake; - -public class LabelDefinition { - - private String classLabel; - private String labelColumn; - - public LabelDefinition(String classLabel, String labelColumn) { - this.classLabel = classLabel; - this.labelColumn = labelColumn; - } - - public String getClassLabel() { - return classLabel; - } - - public void setClassLabel(String classLabel) { - this.classLabel = classLabel; - } - - public String getLabelColumn() { - return labelColumn; - } - - public void setLabelColumn(String labelColumn) { - this.labelColumn = labelColumn; - } -} diff --git a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/PersistedDataStream.java b/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/PersistedDataStream.java deleted file mode 100644 index 277732cd50..0000000000 --- a/streampipes-model/src/main/java/org/apache/streampipes/model/datalake/PersistedDataStream.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.streampipes.model.datalake; - -import org.apache.streampipes.model.schema.EventSchema; -import org.apache.streampipes.model.shared.annotation.TsModel; - -@TsModel -public class PersistedDataStream { - - private String pipelineId; - private String pipelineName; - private EventSchema schema; - private String measureName; - - public PersistedDataStream() { - } - - public PersistedDataStream(String pipelineId, EventSchema schema, String measureName) { - this.pipelineId = pipelineId; - this.schema = schema; - this.measureName = measureName; - } - - public String getPipelineId() { - return pipelineId; - } - - public void setPipelineId(String pipelineId) { - this.pipelineId = pipelineId; - } - - public EventSchema getSchema() { - return schema; - } - - public void setSchema(EventSchema schema) { - this.schema = schema; - } - - public String getMeasureName() { - return measureName; - } - - public void setMeasureName(String measureName) { - this.measureName = measureName; - } - - public String getPipelineName() { - return pipelineName; - } - - public void setPipelineName(String pipelineName) { - this.pipelineName = pipelineName; - } -}