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

HPCC4J-595 Enhance log messages #709

Merged
merged 7 commits into from
May 16, 2024
Merged

HPCC4J-595 Enhance log messages #709

merged 7 commits into from
May 16, 2024

Conversation

drealeed
Copy link
Collaborator

@drealeed drealeed commented May 13, 2024

Enhance error logging to help pinpoint future errors more specifically

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change is a breaking change (fix or feature that will cause existing behavior to change).

Checklist:

  • I have created a corresponding JIRA ticket for this submission
  • My code follows the code style of this project.
    • I have applied the Eclipse code-format template provided.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the HPCC Systems CONTRIBUTORS document (https://github.com/hpcc-systems/HPCC-Platform/wiki/Guide-for-contributors).
  • The change has been fully tested:
    • This change does not cause any existing JUnits to fail.
    • I have include JUnit coverage to test this change
    • I have performed system test and covered possible regressions and side effects.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Premature optimization
    • This change fixes the problem, not just the symptom

Testing:

@drealeed drealeed requested a review from jpmcmu May 13, 2024 14:47
Copy link

Jira Issue: https://hpccsystems.atlassian.net/browse/JAPI-595

Jirabot Action Result:
Workflow Transition: Merge Pending
Updated PR

Copy link
Contributor

@jpmcmu jpmcmu left a comment

Choose a reason for hiding this comment

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

@drealeed Thanks for the PR! Those are definitely some good changes to make, a few comments / changes.

* @throws Exception
* general exception
*/
public HpccRemoteFileReader(DataPartition dp, FieldDef originalRD, IRecordBuilder recBuilder, int connectTimeout, int limit, boolean createPrefetchThread, int readSizeKB, FileReadResumeInfo resumeInfo, int socketOpTimeoutMs, String fileName) throws Exception
Copy link
Contributor

Choose a reason for hiding this comment

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

Passing in the fileName here is a great idea to improve the logging output, and it probably should always have been available within DataPartition. Would you be willing to move fileName into DataPartition? Ideally we would then pass in the filename to DataPartition.createPartitions from HPCCFile.

{
this.recordDefinition = rd;
this.fileName =fileName;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you implement the above change to DataPartition we could then grab the fileName from there.

private static final String[] datasets = { "~benchmark::integer::20kb", "~unit_test::all_types::thor", "~unit_test::all_types::xml", "~unit_test::all_types::json", "~unit_test::all_types::csv" };
private static final int[] expectedCounts = { 1250, 10000, 10000, 10000, 10000, 10000};
private static final String[] datasets = { "~benchmark::integer::20kb", "~benchmark::all_types::200kb"};//, "~unit_test::all_types::xml", "~unit_test::all_types::json", "~unit_test::all_types::csv" };
private static final int[] expectedCounts = { 1250, 5600 };//, 10000, 10000, 10000, 10000};
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets revert these changes, I know there are test failures here with the text files, but those are being addressed.

@@ -57,10 +57,10 @@ public abstract class BaseRemoteTest

protected final static String connString = System.getProperty("hpccconn", "http://localhost:8010");
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets revert these changes as well

@jpmcmu
Copy link
Contributor

jpmcmu commented May 16, 2024

@drealeed Looks good, thanks for implementing those changes. If you can squash, I will merge the PR in.

@jpmcmu jpmcmu changed the title JAPI-595 HPCC4J-595 Enhance log messages May 16, 2024
@jpmcmu jpmcmu merged commit 3c24415 into candidate-9.4.x May 16, 2024
4 of 6 checks passed
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.

2 participants