Creating the GUI Node Class
The GUI node defines the UI behavior of the operator. The utils that we made in the last section are used here. You could have put that code directly into the GUI Node class, but separating it allows for better readability and maintainability.
Before you beginCreating the Utils Object.
- Procedure
- Name the class
SimpleDatasetGeneratorGUINodeand extendOperatorGUINode. This takesIONoneandHDFSTabularDatasetas type parameters. That means that the input to the operator is "none" (because the data set is being created 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 mustextendIOBase, and the types defined here must be consistent with those defined in the runtime and Spark job.
What to do nextCreate the OnPlacement method.