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 19:35:33 UTC

[incubator-heron] branch saadurrahman/3821-Remove-Deprecated-Volumes-K8s-dev updated (2707cd95b53 -> 616eb440abd)

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


    from 2707cd95b53 [K8s] removed unused functions.
     new 6c2e0f58c24 [K8s] Removed old code to add Empty Directory.
     new 053bb5f0443 [K8s] Added support for Host Path.
     new e5212478c8f [K8s] Removed old code to add Host Path.
     new c13f0eedcd4 [K8s] Added support for Network File System.
     new dbd4fceb16a [K8s] Removed old code to add Network File System.
     new cb2ccca05af [K8s] cleanup in VolumeFactory.
     new 616eb440abd [K8s] Interfaces in Volume Factory updated.

The 7 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.


Summary of changes:
 .../heron/scheduler/kubernetes/V1Controller.java   | 66 ++-------------
 .../apache/heron/scheduler/kubernetes/Volumes.java | 93 ++++++++++++++++++++--
 .../heron/scheduler/kubernetes/VolumesTests.java   | 67 +++++++++++++++-
 3 files changed, 157 insertions(+), 69 deletions(-)


[incubator-heron] 07/07: [K8s] Interfaces in Volume Factory updated.

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 616eb440abd6c22dfc20db055804c8c1c90d81eb
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sun May 1 15:35:23 2022 -0400

    [K8s] Interfaces in Volume Factory updated.
    
    Added interfaces:
    - Volume Mounts
    - Persistent Volume Claim
---
 .../apache/heron/scheduler/kubernetes/Volumes.java | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 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 c7abff725b6..038dd08a7d6 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
@@ -23,8 +23,10 @@ import java.util.HashMap;
 import java.util.Map;
 
 import io.kubernetes.client.custom.Quantity;
+import io.kubernetes.client.openapi.models.V1PersistentVolumeClaim;
 import io.kubernetes.client.openapi.models.V1Volume;
 import io.kubernetes.client.openapi.models.V1VolumeBuilder;
+import io.kubernetes.client.openapi.models.V1VolumeMount;
 
 final class Volumes {
 
@@ -35,7 +37,7 @@ final class Volumes {
     PersistentVolumeClaim,
     VolumeMount
   }
-  private final Map<VolumeType, VolumeFactory> volumes = new HashMap<>();
+  private final Map<VolumeType, IVolumeFactory> volumes = new HashMap<>();
 
   private Volumes() {
     volumes.put(VolumeType.EmptyDir, new EmptyDirVolumeFactory());
@@ -63,11 +65,21 @@ final class Volumes {
     return null;
   }
 
-  interface VolumeFactory {
+  interface IVolumeFactory {
     V1Volume create(String volumeName, Map<KubernetesConstants.VolumeConfigKeys, String> configs);
   }
 
-  static class EmptyDirVolumeFactory implements VolumeFactory {
+  interface IVolumeMountFactory {
+    V1VolumeMount create(String volumeName,
+                         Map<KubernetesConstants.VolumeConfigKeys, String> configs);
+  }
+
+  interface IPersistentVolumeClaimFactory {
+    V1PersistentVolumeClaim create(String volumeName,
+                                   Map<KubernetesConstants.VolumeConfigKeys, String> configs);
+  }
+
+  static class EmptyDirVolumeFactory implements IVolumeFactory {
 
     /**
      * Generates an <code>Empty Directory</code> <code>V1 Volume</code>.
@@ -101,7 +113,7 @@ final class Volumes {
     }
   }
 
-  static class HostPathVolumeFactory implements VolumeFactory {
+  static class HostPathVolumeFactory implements IVolumeFactory {
 
     /**
      * Generates a <code>Host Path</code> <code>V1 Volume</code>.
@@ -134,7 +146,7 @@ final class Volumes {
     }
   }
 
-  static class NetworkFileSystemVolumeFactory implements VolumeFactory {
+  static class NetworkFileSystemVolumeFactory implements IVolumeFactory {
 
     /**
      * Generates a <code>Network File System</code> <code>V1 Volume</code>.


[incubator-heron] 02/07: [K8s] Added support 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 053bb5f044388e30673e78d8afc2bfb880468201
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sun May 1 15:14:40 2022 -0400

    [K8s] Added support for Host Path.
---
 .../apache/heron/scheduler/kubernetes/Volumes.java | 34 ++++++++++++++++++++
 .../heron/scheduler/kubernetes/VolumesTests.java   | 36 +++++++++++++++++++---
 2 files changed, 66 insertions(+), 4 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 3b597338031..6dba3bf8547 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,6 +40,7 @@ final class Volumes {
 
   private Volumes() {
     volumes.put(VolumeType.EmptyDir, new EmptyDirVolumeFactory());
+    volumes.put(VolumeType.HostPath, new HostPathVolumeFactory());
   }
 
   static Volumes get() {
@@ -99,4 +100,37 @@ final class Volumes {
       return volume;
     }
   }
+
+  static class HostPathVolumeFactory implements VolumeFactory {
+
+    /**
+     * Generates an <code>Host Path</code> <code>V1 Volume</code>.
+     * @param volumeName The name of the volume to generate.
+     * @param configs A map of configurations.
+     * @return A fully configured <code>Host Path</code> volume.
+     */
+    @Override
+    public V1Volume create(String volumeName,
+                           Map<KubernetesConstants.VolumeConfigKeys, String> configs) {
+      final V1Volume volume = new V1VolumeBuilder()
+          .withName(volumeName)
+          .withNewHostPath()
+          .endHostPath()
+          .build();
+
+      for (Map.Entry<KubernetesConstants.VolumeConfigKeys, String> config : configs.entrySet()) {
+        switch (config.getKey()) {
+          case type:
+            volume.getHostPath().setType(config.getValue());
+            break;
+          case pathOnHost:
+            volume.getHostPath().setPath(config.getValue());
+            break;
+          default:
+            break;
+        }
+      }
+      return volume;
+    }
+  }
 }
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 316947f9267..7e638a839d1 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
@@ -38,7 +38,7 @@ public class VolumesTests {
     final String sizeLimit = "1Gi";
     final String path = "/path/to/mount";
     final String subPath = "/sub/path/to/mount";
-    final Map<KubernetesConstants.VolumeConfigKeys, String> configEmptyDir =
+    final Map<KubernetesConstants.VolumeConfigKeys, String> config =
         ImmutableMap.<KubernetesConstants.VolumeConfigKeys, String>builder()
             .put(KubernetesConstants.VolumeConfigKeys.sizeLimit, sizeLimit)
             .put(KubernetesConstants.VolumeConfigKeys.medium, medium)
@@ -48,14 +48,42 @@ public class VolumesTests {
     final V1Volume expectedVolume = new V1VolumeBuilder()
         .withName(volumeName)
         .withNewEmptyDir()
-        .withMedium(medium)
-        .withNewSizeLimit(sizeLimit)
+          .withMedium(medium)
+          .withNewSizeLimit(sizeLimit)
         .endEmptyDir()
         .build();
 
     final V1Volume actualVolume = Volumes.get()
-        .create(Volumes.VolumeType.EmptyDir, volumeName, configEmptyDir);
+        .create(Volumes.VolumeType.EmptyDir, volumeName, config);
 
     Assert.assertEquals("Volume Factory Empty Directory", expectedVolume, actualVolume);
   }
+
+  @Test
+  public void testHostPath() {
+    final String volumeName = "volume-name-host-path";
+    final String type = "DirectoryOrCreate";
+    final String pathOnHost = "path.on.host";
+    final String path = "/path/to/mount";
+    final String subPath = "/sub/path/to/mount";
+    final Map<KubernetesConstants.VolumeConfigKeys, String> config =
+        ImmutableMap.<KubernetesConstants.VolumeConfigKeys, String>builder()
+            .put(KubernetesConstants.VolumeConfigKeys.type, type)
+            .put(KubernetesConstants.VolumeConfigKeys.pathOnHost, pathOnHost)
+            .put(KubernetesConstants.VolumeConfigKeys.path, path)
+            .put(KubernetesConstants.VolumeConfigKeys.subPath, subPath)
+            .build();
+    final V1Volume expectedVolume = new V1VolumeBuilder()
+        .withName(volumeName)
+        .withNewHostPath()
+          .withNewType(type)
+          .withNewPath(pathOnHost)
+        .endHostPath()
+        .build();
+
+    final V1Volume actualVolume = Volumes.get()
+        .create(Volumes.VolumeType.HostPath, volumeName, config);
+
+    Assert.assertEquals("Volume Factory Host Path", expectedVolume, actualVolume);
+  }
 }


[incubator-heron] 05/07: [K8s] Removed old code to add Network File System.

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 dbd4fceb16a41f8dd7fd3f0bcd4c08751392d16f
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sun May 1 15:26:41 2022 -0400

    [K8s] Removed old code to add Network File System.
    
    Updated V1Controller to use VolumeFactory for Network File System generation.
---
 .../heron/scheduler/kubernetes/V1Controller.java   | 24 ++--------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
index 19986c12a79..338e50bda51 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
@@ -1280,28 +1280,8 @@ public class V1Controller extends KubernetesController {
     for (Map.Entry<String, Map<KubernetesConstants.VolumeConfigKeys, String>> configs
         : mapOfOpts.entrySet()) {
       final String volumeName = configs.getKey();
-      final V1Volume volume = new V1VolumeBuilder()
-          .withName(volumeName)
-          .withNewNfs()
-          .endNfs()
-          .build();
-
-      for (Map.Entry<KubernetesConstants.VolumeConfigKeys, String> config
-          : configs.getValue().entrySet()) {
-        switch(config.getKey()) {
-          case server:
-            volume.getNfs().setServer(config.getValue());
-            break;
-          case pathOnNFS:
-            volume.getNfs().setPath(config.getValue());
-            break;
-          case readOnly:
-            volume.getNfs().setReadOnly(Boolean.parseBoolean(config.getValue()));
-            break;
-          default:
-            break;
-        }
-      }
+      final V1Volume volume = Volumes.get()
+          .create(Volumes.VolumeType.NetworkFileSystem, volumeName, configs.getValue());
       volumes.add(volume);
       volumeMounts.add(createVolumeMountsCLI(volumeName, configs.getValue()));
     }


[incubator-heron] 04/07: [K8s] Added support for Network File System.

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 c13f0eedcd40dc2fe1826b9193f76ea67a488877
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sun May 1 15:25:43 2022 -0400

    [K8s] Added support for Network File System.
---
 .../apache/heron/scheduler/kubernetes/Volumes.java | 42 ++++++++++++++++++++--
 .../heron/scheduler/kubernetes/VolumesTests.java   | 31 ++++++++++++++++
 2 files changed, 71 insertions(+), 2 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 6dba3bf8547..8423ce79e20 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
@@ -41,6 +41,7 @@ final class Volumes {
   private Volumes() {
     volumes.put(VolumeType.EmptyDir, new EmptyDirVolumeFactory());
     volumes.put(VolumeType.HostPath, new HostPathVolumeFactory());
+    volumes.put(VolumeType.NetworkFileSystem, new NetworkFileSystemVolumeFactory());
   }
 
   static Volumes get() {
@@ -72,7 +73,7 @@ final class Volumes {
     /**
      * Generates an <code>Empty Directory</code> <code>V1 Volume</code>.
      * @param volumeName The name of the volume to generate.
-     * @param configs A map of configurations.
+     * @param configs    A map of configurations.
      * @return A fully configured <code>Empty Directory</code> volume.
      */
     @Override
@@ -106,7 +107,7 @@ final class Volumes {
     /**
      * Generates an <code>Host Path</code> <code>V1 Volume</code>.
      * @param volumeName The name of the volume to generate.
-     * @param configs A map of configurations.
+     * @param configs    A map of configurations.
      * @return A fully configured <code>Host Path</code> volume.
      */
     @Override
@@ -133,4 +134,41 @@ final class Volumes {
       return volume;
     }
   }
+
+  static class NetworkFileSystemVolumeFactory implements VolumeFactory {
+
+    /**
+     * Generates an <code>Network File System</code> <code>V1 Volume</code>.
+     *
+     * @param volumeName The name of the volume to generate.
+     * @param configs    A map of configurations.
+     * @return A fully configured <code>Network File System</code> volume.
+     */
+    @Override
+    public V1Volume create(String volumeName,
+                           Map<KubernetesConstants.VolumeConfigKeys, String> configs) {
+      final V1Volume volume = new V1VolumeBuilder()
+          .withName(volumeName)
+          .withNewNfs()
+          .endNfs()
+          .build();
+
+      for (Map.Entry<KubernetesConstants.VolumeConfigKeys, String> config : configs.entrySet()) {
+        switch (config.getKey()) {
+          case server:
+            volume.getNfs().setServer(config.getValue());
+            break;
+          case pathOnNFS:
+            volume.getNfs().setPath(config.getValue());
+            break;
+          case readOnly:
+            volume.getNfs().setReadOnly(Boolean.parseBoolean(config.getValue()));
+            break;
+          default:
+            break;
+        }
+      }
+      return volume;
+    }
+  }
 }
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 7e638a839d1..10bb4739bdf 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
@@ -86,4 +86,35 @@ public class VolumesTests {
 
     Assert.assertEquals("Volume Factory Host Path", expectedVolume, actualVolume);
   }
+
+  @Test
+  public void testNetworkFileSystem() {
+    final String volumeName = "volume-name-nfs";
+    final String server = "nfs.server.address";
+    final String pathOnNFS = "path.on.host";
+    final String readOnly = "true";
+    final String path = "/path/to/mount";
+    final String subPath = "/sub/path/to/mount";
+    final Map<KubernetesConstants.VolumeConfigKeys, String> config =
+        ImmutableMap.<KubernetesConstants.VolumeConfigKeys, String>builder()
+            .put(KubernetesConstants.VolumeConfigKeys.server, server)
+            .put(KubernetesConstants.VolumeConfigKeys.readOnly, readOnly)
+            .put(KubernetesConstants.VolumeConfigKeys.pathOnNFS, pathOnNFS)
+            .put(KubernetesConstants.VolumeConfigKeys.path, path)
+            .put(KubernetesConstants.VolumeConfigKeys.subPath, subPath)
+            .build();
+    final V1Volume expectedVolume = new V1VolumeBuilder()
+        .withName(volumeName)
+        .withNewNfs()
+          .withServer(server)
+          .withPath(pathOnNFS)
+          .withReadOnly(Boolean.parseBoolean(readOnly))
+        .endNfs()
+        .build();
+
+    final V1Volume actualVolume = Volumes.get()
+        .create(Volumes.VolumeType.NetworkFileSystem, volumeName, config);
+
+    Assert.assertEquals("Volume Factory Network File System", expectedVolume, actualVolume);
+  }
 }


[incubator-heron] 01/07: [K8s] Removed old code to add Empty Directory.

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 6c2e0f58c2446babf1044a889912e9166fb4c82d
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sun May 1 14:59:50 2022 -0400

    [K8s] Removed old code to add Empty Directory.
    
    Updated V1Controller to use VolumeFactory for Empty Directory generation.
---
 .../heron/scheduler/kubernetes/V1Controller.java    | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
index cfe4a9d923e..dd54b3e32ff 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
@@ -1238,25 +1238,8 @@ public class V1Controller extends KubernetesController {
     for (Map.Entry<String, Map<KubernetesConstants.VolumeConfigKeys, String>> configs
         : mapOfOpts.entrySet()) {
       final String volumeName = configs.getKey();
-      final V1Volume volume = new V1VolumeBuilder()
-          .withName(volumeName)
-          .withNewEmptyDir()
-          .endEmptyDir()
-          .build();
-
-      for (Map.Entry<KubernetesConstants.VolumeConfigKeys, String> config
-          : configs.getValue().entrySet()) {
-        switch(config.getKey()) {
-          case medium:
-            volume.getEmptyDir().medium(config.getValue());
-            break;
-          case sizeLimit:
-            volume.getEmptyDir().sizeLimit(new Quantity(config.getValue()));
-            break;
-          default:
-            break;
-        }
-      }
+      final V1Volume volume = Volumes.get()
+          .create(Volumes.VolumeType.EmptyDir, volumeName, configs.getValue());
       volumes.add(volume);
       volumeMounts.add(createVolumeMountsCLI(volumeName, configs.getValue()));
     }


[incubator-heron] 03/07: [K8s] Removed old code to add 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 e5212478c8fb1ba2a4ba77434ab867f0f7ce8787
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sun May 1 15:17:11 2022 -0400

    [K8s] Removed old code to add Host Path.
    
    Updated V1Controller to use VolumeFactory for Host Path generation.
---
 .../heron/scheduler/kubernetes/V1Controller.java    | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
index dd54b3e32ff..19986c12a79 100644
--- a/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
+++ b/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
@@ -1259,25 +1259,8 @@ public class V1Controller extends KubernetesController {
     for (Map.Entry<String, Map<KubernetesConstants.VolumeConfigKeys, String>> configs
         : mapOfOpts.entrySet()) {
       final String volumeName = configs.getKey();
-      final V1Volume volume = new V1VolumeBuilder()
-          .withName(volumeName)
-          .withNewHostPath()
-          .endHostPath()
-          .build();
-
-      for (Map.Entry<KubernetesConstants.VolumeConfigKeys, String> config
-          : configs.getValue().entrySet()) {
-        switch(config.getKey()) {
-          case type:
-            volume.getHostPath().setType(config.getValue());
-            break;
-          case pathOnHost:
-            volume.getHostPath().setPath(config.getValue());
-            break;
-          default:
-            break;
-        }
-      }
+      final V1Volume volume = Volumes.get()
+          .create(Volumes.VolumeType.HostPath, volumeName, configs.getValue());
       volumes.add(volume);
       volumeMounts.add(createVolumeMountsCLI(volumeName, configs.getValue()));
     }


[incubator-heron] 06/07: [K8s] cleanup in VolumeFactory.

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 cb2ccca05afc7da6acec8a1142a19ce6b2ec78d4
Author: Saad Ur Rahman <sa...@apache.org>
AuthorDate: Sun May 1 15:30:25 2022 -0400

    [K8s] cleanup in VolumeFactory.
---
 .../src/java/org/apache/heron/scheduler/kubernetes/Volumes.java      | 5 ++---
 1 file changed, 2 insertions(+), 3 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 8423ce79e20..c7abff725b6 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
@@ -30,7 +30,6 @@ final class Volumes {
 
   public enum VolumeType {
     EmptyDir,
-    Generic,
     HostPath,
     NetworkFileSystem,
     PersistentVolumeClaim,
@@ -105,7 +104,7 @@ final class Volumes {
   static class HostPathVolumeFactory implements VolumeFactory {
 
     /**
-     * Generates an <code>Host Path</code> <code>V1 Volume</code>.
+     * Generates a <code>Host Path</code> <code>V1 Volume</code>.
      * @param volumeName The name of the volume to generate.
      * @param configs    A map of configurations.
      * @return A fully configured <code>Host Path</code> volume.
@@ -138,7 +137,7 @@ final class Volumes {
   static class NetworkFileSystemVolumeFactory implements VolumeFactory {
 
     /**
-     * Generates an <code>Network File System</code> <code>V1 Volume</code>.
+     * Generates a <code>Network File System</code> <code>V1 Volume</code>.
      *
      * @param volumeName The name of the volume to generate.
      * @param configs    A map of configurations.