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

MINIFICPP-1743 Added PutGCSObject processor #1268

Closed
wants to merge 7 commits into from

Conversation

martinzink
Copy link
Member

@martinzink martinzink commented Feb 22, 2022

Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically main)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.

@martinzink martinzink marked this pull request as ready for review February 23, 2022 07:39
cmake/GoogleCloudCpp.cmake Outdated Show resolved Hide resolved
extensions/gcp/tests/PutGcsObjectTests.cpp Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGcsObject.cpp Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGcsObject.cpp Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGcsObject.cpp Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGcsObject.cpp Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGcsObject.cpp Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGcsObject.h Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGcsObject.h Outdated Show resolved Hide resolved
extensions/gcp/utils/GCPAttributes.h Outdated Show resolved Hide resolved
cmake/GoogleCloudCpp.cmake Outdated Show resolved Hide resolved
cmake/GoogleCloudCpp.cmake Outdated Show resolved Hide resolved
PROCESSORS.md Outdated Show resolved Hide resolved
PROCESSORS.md Outdated Show resolved Hide resolved
docker/test/integration/steps/steps.py Outdated Show resolved Hide resolved
Comment on lines 59 to 61
flow_file.setAttribute(GCS_CREATE_TIME_ATTR, std::to_string(object_metadata.time_created().time_since_epoch().count()));
flow_file.setAttribute(GCS_UPDATE_TIME_ATTR, std::to_string(object_metadata.updated().time_since_epoch().count()));
flow_file.setAttribute(GCS_DELETE_TIME_ATTR, std::to_string(object_metadata.time_deleted().time_since_epoch().count()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these in seconds, milliseconds, or something else? I think we should either write these timestamps in an unambiguous format like iso8601, or add something like ".unix-timestamp.seconds" to their name and put a duration_cast here.

Copy link
Member Author

@martinzink martinzink Mar 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch it was ambiguous so I've added the duration_cast: 0492f5b#diff-458da9b99a0922017a48a3a4264bee04d171dce2845bce752aa2ea8430a0df26R59-R61

However about the name and type:
nifi uses the same naming scheme with simple integer timestamps, I think we should be consistent with that.
0492f5b#diff-458da9b99a0922017a48a3a4264bee04d171dce2845bce752aa2ea8430a0df26R59-R61

Maybe we should document this in PROCESSORS.md, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that makes sense. Yes, documenting the format of these timestamps in PROCESSORS.md (while rolling our eyes in the general direction of NiFi developers) is probably the best we can do.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, I missed that, sorry. I would prefer "(Unix timestamp in milliseconds)" instead of "(milliseconds)", but it's OK either way.

extensions/gcp/GCPAttributes.h Show resolved Hide resolved
extensions/gcp/processors/PutGCSObject.h Show resolved Hide resolved
extensions/gcp/processors/PutGCSObject.cpp Outdated Show resolved Hide resolved
extensions/gcp/processors/PutGCSObject.h Outdated Show resolved Hide resolved
extensions/gcp/tests/PutGCSObjectTests.cpp Outdated Show resolved Hide resolved
extensions/gcp/tests/PutGCSObjectTests.cpp Outdated Show resolved Hide resolved
martinzink and others added 2 commits March 16, 2022 17:25
Co-authored-by: Ferenc Gerlits <fgerlits@users.noreply.github.com>
@szaszm szaszm closed this in bd3f870 Mar 28, 2022
@martinzink martinzink deleted the MINIFICPP-1743 branch March 6, 2023 08:51
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

Successfully merging this pull request may close these issues.

5 participants