Creating the GUI Node Class

The GUI node defines the UI behavior of the operator. The utils that we made in the last section will come into play here. While we could have put that code directly into the GUI Node class, separating it allows for better readability and maintainability.

Prerequisites

You must have created the Utils object.

Procedure

  • Name the class SimpleDatasetGeneratorGUINode and extend OperatorGUINode. This takes IONone and HDFSTabularDataset as type parameters. That means that the input to our operator is "none" (we are creating a data set from scratch) and the output is an HDFS dataset. The code looks like this:
    class SimpleDatasetGeneratorGUINode
      extends OperatorGUINode[IONone, HdfsTabularDataset] {
    }
    Note: The input and output for the operator must extendIOBase, and the types defined here must be consistent with those defined in the runtime and Spark job.