@Override
    public void validate() {
        super.validate();
        checkArgument(rotationRecords > 0, "rotationRecords must be a positive long.");
        checkArgument(rotationInterval == -1 || rotationInterval > 0,
            "rotationInterval must be either -1 or a positive long.");
    }
@Test
    public final void validateTest() throws IOException {
        Map<String, Object> map = new HashMap<>();
        map.put("alluxioMasterHost", "localhost");
        map.put("alluxioMasterPort", "19998");
        map.put("alluxioDir", "pulsar");
        map.put("filePrefix", "TopicA");
        map.put("fileExtension", ".txt");
        map.put("lineSeparator", "\n");
        map.put("rotationRecords", "100");
        map.put("rotationInterval", "-1");

        AlluxioSinkConfig config = AlluxioSinkConfig.load(map);
        config.validate();
    }