You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/05 02:01:19 UTC
[GitHub] [iceberg] felixYyu opened a new issue, #4498: Checkstyle: Do need to add the checkstyle rule of static variables?
felixYyu opened a new issue, #4498:
URL: https://github.com/apache/iceberg/issues/4498
In ALL iceberg project,Static variables are directly embedded in the code segment, which is not conducive to maintenance.
Do need to formulate a unified rule?
> e.g. BaseRewriteManifestsSparkAction
```
@Override
public RewriteManifests.Result execute() {
String desc = String.format("Rewriting manifests (staging location=%s) of %s", stagingLocation, table.name());
JobGroupInfo info = newJobGroupInfo("**REWRITE-MANIFESTS**", desc);
return withJobGroupInfo(info, this::doExecute);
}
private Dataset<Row> buildManifestEntryDF(List<ManifestFile> manifests) {
Dataset<Row> manifestDF = spark()
.createDataset(Lists.transform(manifests, ManifestFile::path), Encoders.STRING())
.toDF("**manifest**");
Dataset<Row> manifestEntryDF = loadMetadataTable(table, ENTRIES)
.filter("status < 2") // select only live entries
.selectExpr("input_file_name() as manifest", "**snapshot_id**", "**sequence_number**", "**data_file**");
Column joinCond = manifestDF.col("manifest").equalTo(manifestEntryDF.col("**manifest**"));
return manifestEntryDF
.join(manifestDF, joinCond, "**left_semi**")
.select("**snapshot_id**", "**sequence_number**", "**data_file**");
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] felixYyu closed issue #4498: Checkstyle: Do need to add the checkstyle rule of static variables?
Posted by GitBox <gi...@apache.org>.
felixYyu closed issue #4498: Checkstyle: Do need to add the checkstyle rule of static variables?
URL: https://github.com/apache/iceberg/issues/4498
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] RussellSpitzer commented on issue #4498: Checkstyle: Do need to add the checkstyle rule of static variables?
Posted by GitBox <gi...@apache.org>.
RussellSpitzer commented on issue #4498:
URL: https://github.com/apache/iceberg/issues/4498#issuecomment-1088210857
I'm not sure what you mean
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] felixYyu commented on issue #4498: Checkstyle: Do need to add the checkstyle rule of static variables?
Posted by GitBox <gi...@apache.org>.
felixYyu commented on issue #4498:
URL: https://github.com/apache/iceberg/issues/4498#issuecomment-1088205793
cc @rdblue @RussellSpitzer @jackye1995 @aokolnychyi @kbendick @openinx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] felixYyu commented on issue #4498: Checkstyle: Do need to add the checkstyle rule of static variables?
Posted by GitBox <gi...@apache.org>.
felixYyu commented on issue #4498:
URL: https://github.com/apache/iceberg/issues/4498#issuecomment-1088227496
private static final String REWRITE_MANIFESTS = "REWRITE-MANIFESTS";
public RewriteManifests.Result execute() {
String desc = String.format("Rewriting manifests (staging location=%s) of %s", stagingLocation, table.name());
// I think static var should instead, Other code should also be used as a constraint
//JobGroupInfo info = newJobGroupInfo("REWRITE-MANIFESTS", desc);
JobGroupInfo info = newJobGroupInfo(REWRITE_MANIFESTS, desc);
return withJobGroupInfo(info, this::doExecute);
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] felixYyu commented on issue #4498: Checkstyle: Do need to add the checkstyle rule of static variables?
Posted by GitBox <gi...@apache.org>.
felixYyu commented on issue #4498:
URL: https://github.com/apache/iceberg/issues/4498#issuecomment-1118542840
It's hard to unify, so close this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org