You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by sa...@apache.org on 2022/05/01 00:14:08 UTC

[incubator-heron] branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev created (now 0ef4430c699)

This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a change to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


      at 0ef4430c699 [K8s] Removed unneeded imports and constants.

This branch includes the following new commits:

     new 9619c055c41 [K8s] Removed EBS keys from context.
     new b0706bf6db8 [K8s] removed factory type for EBS.
     new 25c7c257a17 [K8s] removed tests for EBS.
     new b3383f64d72 [K8s] Removed NFS keys from context.
     new 06b5f84b3e8 [K8s] removed factory type for NFS.
     new 4f7f72cf14d [K8s] removed tests for NFS.
     new 4c2bb11d0ce [K8s] Removed Host Path keys from context.
     new 0f7dc300348 [K8s] removed factory type for Host Path.
     new d42740896af [K8s] removed tests for Host Path.
     new 0ef4430c699 [K8s] Removed unneeded imports and constants.

The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-heron] 05/10: [K8s] removed factory type for NFS.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 06b5f84b3e8150f0067d7f20f5d6986f21667ebe
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 11:51:51 2022 -0400

    [K8s] removed factory type for NFS.
---
 .../org/apache/heron/scheduler/kubernetes/Volumes.java | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
index 5d97dd4ba80..ff16f2cb258 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
@@ -39,7 +39,6 @@ final class Volumes {
 
   private Volumes() {
     volumes.put(HOST_PATH, new HostPathVolumeFactory());
-    volumes.put(NFS, new NfsVolumeFactory());
   }
 
   static Volumes get() {
@@ -77,21 +76,4 @@ final class Volumes {
       return volume;
     }
   }
-
-  static class NfsVolumeFactory implements VolumeFactory {
-    @Override
-    public V1Volume create(Config config) {
-      final V1Volume volume = newVolume(config);
-
-      final String path = KubernetesContext.getNfsVolumePath(config);
-      final String server = KubernetesContext.getNfsServer(config);
-      V1NFSVolumeSource nfsVolumeSource =
-          new V1NFSVolumeSource()
-              .path(path)
-              .server(server);
-      volume.setNfs(nfsVolumeSource);
-
-      return volume;
-    }
-  }
 }


[incubator-heron] 06/10: [K8s] removed tests for NFS.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 4f7f72cf14d5df9880983d37316434faa824cea2
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 11:52:17 2022 -0400

    [K8s] removed tests for NFS.
---
 .../apache/heron/scheduler/kubernetes/VolumesTests.java | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java b/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
index b6c2323dc6f..111ca35a97a 100644
--- a/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
+++ b/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
@@ -48,21 +48,4 @@ public class VolumesTests {
     Assert.assertNotNull(volume.getHostPath());
     Assert.assertEquals(volume.getHostPath().getPath(), path);
   }
-
-  @Test
-  public void testNfsVolume() {
-    final String path = "/test/dir1";
-    final String server = "10.10.10.10";
-    final Config config = Config.newBuilder()
-        .put(KubernetesContext.KUBERNETES_VOLUME_TYPE, "nfs")
-        .put(KubernetesContext.KUBERNETES_VOLUME_NFS_PATH, path)
-        .put(KubernetesContext.KUBERNETES_VOLUME_NFS_SERVER, server)
-        .build();
-
-    final V1Volume volume = Volumes.get().create(config);
-    Assert.assertNotNull(volume);
-    Assert.assertNotNull(volume.getNfs());
-    Assert.assertEquals(volume.getNfs().getPath(), path);
-    Assert.assertEquals(volume.getNfs().getServer(), server);
-  }
 }


[incubator-heron] 10/10: [K8s] Removed unneeded imports and constants.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 0ef4430c6991f81289385c0e51e8358b4ef47e77
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 13:59:39 2022 -0400

    [K8s] Removed unneeded imports and constants.
---
 .../src/java/org/apache/heron/scheduler/kubernetes/Volumes.java    | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
index 85cae559627..a4d92cfc938 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
@@ -24,17 +24,10 @@ import java.util.Map;
 
 import org.apache.heron.spi.common.Config;
 
-import io.kubernetes.client.openapi.models.V1AWSElasticBlockStoreVolumeSource;
-import io.kubernetes.client.openapi.models.V1HostPathVolumeSource;
-import io.kubernetes.client.openapi.models.V1NFSVolumeSource;
 import io.kubernetes.client.openapi.models.V1Volume;
 
 final class Volumes {
 
-  static final String AWS_EBS = "awsElasticBlockStore";
-  static final String HOST_PATH = "hostPath";
-  static final String NFS = "nfs";
-
   private final Map<String, VolumeFactory> volumes = new HashMap<>();
 
   private Volumes() {


[incubator-heron] 08/10: [K8s] removed factory type for Host Path.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 0f7dc30034866c3c900ab6946d41eed28fbf203e
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 12:04:47 2022 -0400

    [K8s] removed factory type for Host Path.
---
 .../org/apache/heron/scheduler/kubernetes/Volumes.java   | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
index ff16f2cb258..85cae559627 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
@@ -38,7 +38,6 @@ final class Volumes {
   private final Map<String, VolumeFactory> volumes = new HashMap<>();
 
   private Volumes() {
-    volumes.put(HOST_PATH, new HostPathVolumeFactory());
   }
 
   static Volumes get() {
@@ -61,19 +60,4 @@ final class Volumes {
     final String volumeName = KubernetesContext.getVolumeName(config);
     return new V1Volume().name(volumeName);
   }
-
-  static class HostPathVolumeFactory implements VolumeFactory {
-    @Override
-    public V1Volume create(Config config) {
-      final V1Volume volume = newVolume(config);
-
-      final String path = KubernetesContext.getHostPathVolumePath(config);
-      final V1HostPathVolumeSource hostPathVolume =
-          new V1HostPathVolumeSource()
-              .path(path);
-      volume.hostPath(hostPathVolume);
-
-      return volume;
-    }
-  }
 }


[incubator-heron] 01/10: [K8s] Removed EBS keys from context.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 9619c055c41cba95b8969123ebc8a5ed81400de5
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 11:47:43 2022 -0400

    [K8s] Removed EBS keys from context.
---
 .../heron/scheduler/kubernetes/KubernetesContext.java     | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
index 242e4f1fadd..9f589a0f948 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
@@ -81,13 +81,6 @@ public final class KubernetesContext extends Context {
   public static final String KUBERNETES_VOLUME_NFS_SERVER =
       "heron.kubernetes.volume.nfs.server";
 
-  // awsElasticBlockStore volume keys
-  // https://kubernetes.io/docs/concepts/storage/volumes/#awselasticblockstore
-  public static final String KUBERNETES_VOLUME_AWS_EBS_VOLUME_ID =
-      "heron.kubernetes.volume.awsElasticBlockStore.volumeID";
-  public static final String KUBERNETES_VOLUME_AWS_EBS_FS_TYPE =
-      "heron.kubernetes.volume.awsElasticBlockStore.fsType";
-
   // Pod Template ConfigMap: heron.kubernetes.[executor | manager].pod.template
   public static final String KUBERNETES_POD_TEMPLATE_LOCATION =
       "heron.kubernetes.%s.pod.template";
@@ -186,14 +179,6 @@ public final class KubernetesContext extends Context {
     return config.getStringValue(KUBERNETES_VOLUME_NFS_SERVER);
   }
 
-  static String getAwsEbsVolumeId(Config config) {
-    return config.getStringValue(KUBERNETES_VOLUME_AWS_EBS_VOLUME_ID);
-  }
-
-  static String getAwsEbsFsType(Config config) {
-    return config.getStringValue(KUBERNETES_VOLUME_AWS_EBS_FS_TYPE);
-  }
-
   static boolean hasVolume(Config config) {
     return isNotEmpty(getVolumeType(config));
   }


[incubator-heron] 02/10: [K8s] removed factory type for EBS.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit b0706bf6db88b9a6d0152e2c78aeff1cbd9b9153
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 11:48:27 2022 -0400

    [K8s] removed factory type for EBS.
---
 .../org/apache/heron/scheduler/kubernetes/Volumes.java | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
index 90f15bd7334..5d97dd4ba80 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/Volumes.java
@@ -40,7 +40,6 @@ final class Volumes {
   private Volumes() {
     volumes.put(HOST_PATH, new HostPathVolumeFactory());
     volumes.put(NFS, new NfsVolumeFactory());
-    volumes.put(AWS_EBS, new AwsEbsVolumeFactory());
   }
 
   static Volumes get() {
@@ -95,21 +94,4 @@ final class Volumes {
       return volume;
     }
   }
-
-  static class AwsEbsVolumeFactory implements VolumeFactory {
-    @Override
-    public V1Volume create(Config config) {
-      final V1Volume volume = newVolume(config);
-
-      final String volumeId = KubernetesContext.getAwsEbsVolumeId(config);
-      final String fsType = KubernetesContext.getAwsEbsFsType(config);
-      V1AWSElasticBlockStoreVolumeSource awsElasticBlockStoreVolumeSource =
-          new V1AWSElasticBlockStoreVolumeSource()
-              .volumeID(volumeId)
-              .fsType(fsType);
-      volume.setAwsElasticBlockStore(awsElasticBlockStoreVolumeSource);
-
-      return volume;
-    }
-  }
 }


[incubator-heron] 03/10: [K8s] removed tests for EBS.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 25c7c257a174e48564784522be9c712d82ec627e
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 11:48:45 2022 -0400

    [K8s] removed tests for EBS.
---
 .../apache/heron/scheduler/kubernetes/VolumesTests.java | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java b/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
index 401c97f9f64..b6c2323dc6f 100644
--- a/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
+++ b/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
@@ -65,21 +65,4 @@ public class VolumesTests {
     Assert.assertEquals(volume.getNfs().getPath(), path);
     Assert.assertEquals(volume.getNfs().getServer(), server);
   }
-
-  @Test
-  public void testAwsEbsVolume() {
-    final String volumeId = "aws-ebs-1";
-    final String fsType = "ext4";
-    final Config config = Config.newBuilder()
-        .put(KubernetesContext.KUBERNETES_VOLUME_TYPE, "awsElasticBlockStore")
-        .put(KubernetesContext.KUBERNETES_VOLUME_AWS_EBS_VOLUME_ID, volumeId)
-        .put(KubernetesContext.KUBERNETES_VOLUME_AWS_EBS_FS_TYPE, fsType)
-        .build();
-
-    final V1Volume volume = Volumes.get().create(config);
-    Assert.assertNotNull(volume);
-    Assert.assertNotNull(volume.getAwsElasticBlockStore());
-    Assert.assertEquals(volume.getAwsElasticBlockStore().getVolumeID(), volumeId);
-    Assert.assertEquals(volume.getAwsElasticBlockStore().getFsType(), fsType);
-  }
 }


[incubator-heron] 09/10: [K8s] removed tests for Host Path.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit d42740896af1761959fa5d3dc2a6c68b7b6ec501
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 12:05:31 2022 -0400

    [K8s] removed tests for Host Path.
---
 .../apache/heron/scheduler/kubernetes/VolumesTests.java    | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java b/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
index 111ca35a97a..2609e70f177 100644
--- a/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
+++ b/heron/schedulers/tests/java/org/apache/heron/scheduler/kubernetes/VolumesTests.java
@@ -34,18 +34,4 @@ public class VolumesTests {
     final V1Volume volume = Volumes.get().create(config);
     Assert.assertNull(volume);
   }
-
-  @Test
-  public void testHostPathVolume() {
-    final String path = "/test/dir1";
-    final Config config = Config.newBuilder()
-        .put(KubernetesContext.KUBERNETES_VOLUME_TYPE, "hostPath")
-        .put(KubernetesContext.KUBERNETES_VOLUME_HOSTPATH_PATH, path)
-        .build();
-
-    final V1Volume volume = Volumes.get().create(config);
-    Assert.assertNotNull(volume);
-    Assert.assertNotNull(volume.getHostPath());
-    Assert.assertEquals(volume.getHostPath().getPath(), path);
-  }
 }


[incubator-heron] 04/10: [K8s] Removed NFS keys from context.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit b3383f64d72bfbdbcc2119e3090030739d0a6156
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 11:51:23 2022 -0400

    [K8s] Removed NFS keys from context.
---
 .../heron/scheduler/kubernetes/KubernetesContext.java     | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
index 9f589a0f948..c005ffe812a 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
@@ -74,13 +74,6 @@ public final class KubernetesContext extends Context {
   public static final String KUBERNETES_VOLUME_HOSTPATH_PATH =
       "heron.kubernetes.volume.hostPath.path";
 
-  // nfs volume keys
-  // https://kubernetes.io/docs/concepts/storage/volumes/#nfs
-  public static final String KUBERNETES_VOLUME_NFS_PATH =
-      "heron.kubernetes.volume.nfs.path";
-  public static final String KUBERNETES_VOLUME_NFS_SERVER =
-      "heron.kubernetes.volume.nfs.server";
-
   // Pod Template ConfigMap: heron.kubernetes.[executor | manager].pod.template
   public static final String KUBERNETES_POD_TEMPLATE_LOCATION =
       "heron.kubernetes.%s.pod.template";
@@ -171,14 +164,6 @@ public final class KubernetesContext extends Context {
     return config.getStringValue(KUBERNETES_VOLUME_HOSTPATH_PATH);
   }
 
-  static String getNfsVolumePath(Config config) {
-    return config.getStringValue(KUBERNETES_VOLUME_NFS_PATH);
-  }
-
-  static String getNfsServer(Config config) {
-    return config.getStringValue(KUBERNETES_VOLUME_NFS_SERVER);
-  }
-
   static boolean hasVolume(Config config) {
     return isNotEmpty(getVolumeType(config));
   }


[incubator-heron] 07/10: [K8s] Removed Host Path keys from context.

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

saadurrahman pushed a commit to branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 4c2bb11d0ce5c8e8e67bd1b9897961e5e6c9f766
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sat Apr 30 12:02:57 2022 -0400

    [K8s] Removed Host Path keys from context.
---
 .../org/apache/heron/scheduler/kubernetes/KubernetesContext.java | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
index c005ffe812a..091d3c25df4 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java
@@ -69,11 +69,6 @@ public final class KubernetesContext extends Context {
   public static final String KUBERNETES_VOLUME_TYPE = "heron.kubernetes.volume.type";
 
 
-  // HostPath volume keys
-  // https://kubernetes.io/docs/concepts/storage/volumes/#hostpath
-  public static final String KUBERNETES_VOLUME_HOSTPATH_PATH =
-      "heron.kubernetes.volume.hostPath.path";
-
   // Pod Template ConfigMap: heron.kubernetes.[executor | manager].pod.template
   public static final String KUBERNETES_POD_TEMPLATE_LOCATION =
       "heron.kubernetes.%s.pod.template";
@@ -160,10 +155,6 @@ public final class KubernetesContext extends Context {
     return config.getStringValue(KUBERNETES_VOLUME_NAME);
   }
 
-  static String getHostPathVolumePath(Config config) {
-    return config.getStringValue(KUBERNETES_VOLUME_HOSTPATH_PATH);
-  }
-
   static boolean hasVolume(Config config) {
     return isNotEmpty(getVolumeType(config));
   }