Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于udf中transform里面日志不打印 #11937

Open
bigdata-spec opened this issue Jan 19, 2024 · 1 comment
Open

关于udf中transform里面日志不打印 #11937

bigdata-spec opened this issue Jan 19, 2024 · 1 comment

Comments

@bigdata-spec
Copy link

public class UDTFSequenceFilter implements UDTF {
    @Override
    public void validate(UDFParameterValidator validator) {
        int childExpressionsSize = validator.getParameters().getChildExpressionsSize();
        LOG.info("childExpressionsSize "+childExpressionsSize);
        List<String> childExpressions = validator.getParameters().getChildExpressions();
        LOG.info("childExpressions "+childExpressions);
        for (int i = 0; i < validator.getParameters().getChildExpressionsSize(); ++i) {
            if(i==0){
            validator.validateInputSeriesDataType(i, Type.BOOLEAN);}
            else {
                validator
                        .validateInputSeriesDataType(0, Type.FLOAT, Type.DOUBLE, Type.INT32, Type.INT64, Type.BOOLEAN);
            }
        }
        LOG.info("validate完成");
    }

    @Override
    public void beforeStart(UDFParameters udfParameters, UDTFConfigurations udtfConfigurations) {
        udtfConfigurations
                .setAccessStrategy(new RowByRowAccessStrategy())
                .setOutputDataType(Type.TEXT);
        LOG.info("beforeStart完成");
    }

    @Override
    public void transform(Row row, PointCollector collector) throws Exception {
        LOG.info("进入transform....");
    
    }

    @Override
    public void terminate(PointCollector collector) {
      LOG.info("进入terminate....");
  
    }
}

请问下后台发现 validate 和beforeStart 日志正常打印,但是transform和 terminate 不打印日志,IotDB版本1.2.2,是否正常呢?

@bigdata-spec
Copy link
Author

validate完成
"beforeStart完成"这两个日志会打印出来
但是"进入transform...." 进入terminate....这两句不会打印出来。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant