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

Add deprecation warnings to outmoded Arc and Warc formats. #140

Merged
merged 7 commits into from
Dec 7, 2017

Conversation

greebie
Copy link
Contributor

@greebie greebie commented Dec 6, 2017

Add Deprecation warnings to Arc & Warc Writeable and Input Formats


GitHub issue(s):

Related to discussion in #80.

What does this Pull Request do?

Add deprecation warnings to unused Warc and Arc java files.

How should this be tested?

N/A

Additional Notes:

@lintool suggests that this code has other potential purposes in #102 (comment) so I recommend having his okay before merging. Alternately, it may be good to have a nice place to store this code somewhere.

5bc95a1 contains working code for removal in the next cycle.

Interested parties

@lintool

Thanks in advance for your help with the Archives Unleashed Toolkit!

@ianmilligan1 ianmilligan1 requested a review from lintool December 6, 2017 15:52
@codecov
Copy link

codecov bot commented Dec 6, 2017

Codecov Report

Merging #140 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #140      +/-   ##
==========================================
+ Coverage    67.7%   67.74%   +0.04%     
==========================================
  Files          38       38              
  Lines         774      775       +1     
  Branches      143      143              
==========================================
+ Hits          524      525       +1     
  Misses        201      201              
  Partials       49       49
Impacted Files Coverage Δ
...ava/io/archivesunleashed/io/ArcRecordWritable.java 65.21% <ø> (ø) ⬆️
...va/io/archivesunleashed/io/WarcRecordWritable.java 65.21% <ø> (ø) ⬆️
...ivesunleashed/io/GenericArchiveRecordWritable.java 68.08% <ø> (ø) ⬆️
...ivesunleashed/mapreduce/WacGenericInputFormat.java 73.07% <ø> (ø) ⬆️
...rchivesunleashed/mapreduce/WacWarcInputFormat.java 65.85% <ø> (ø) ⬆️
...archivesunleashed/mapreduce/WacArcInputFormat.java 76.19% <100%> (+0.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 116b053...fe147ba. Read the comment docs.


/**
* @deprecated as of 0.11.0 and will be removed
* in a future release. Use GenericArchiveRecordWritable (0.11.0) or
Copy link
Member

Choose a reason for hiding this comment

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

Remove double-space.

@@ -14,6 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Features here have been deprecated as of 0.11.0 and will be replaced
Copy link
Member

Choose a reason for hiding this comment

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

Start with @deprecated here.

Copy link
Member

Choose a reason for hiding this comment

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

Version number should be 0.12.0 since 0.11.0 is already out, and it was not marked as deprecated in it. Once this gets merged in, we resolve #124, and figure out the Docker build issue, we'll cut 0.12.0.


/**
* @deprecated as of 0.11.0 and will be removed
* in a future release. Use WacGenericArchiveInputFormat (0.11.0) or
Copy link
Member

Choose a reason for hiding this comment

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

No double-space.

@@ -14,6 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Features here have been deprecated as of 0.11.0 and will be replaced
Copy link
Member

Choose a reason for hiding this comment

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


/**
* @deprecated as of 0.11.0 and will be removed
* in a future release. Use WacGenericArchiveInputFormat (0.11.0) or
Copy link
Member

Choose a reason for hiding this comment

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

No double-space.

/**
* @deprecated as of 0.11.0 and will be removed
* in a future release. Use WacGenericArchiveInputFormat (0.11.0) or
* WacArchiveInputFormat (future releases) instead.
Copy link
Member

Choose a reason for hiding this comment

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

Remove (future releases)

/**
* @deprecated as of 0.11.0 and will be removed
* in a future release. Use WacGenericArchiveInputFormat (0.11.0) or
* WacArchiveInputFormat (future releases) instead.
Copy link
Member

Choose a reason for hiding this comment

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

Remove future releases.

/**
* @deprecated as of 0.11.0 and will be removed
* in a future release. Use GenericArchiveRecordWritable (0.11.0) or
* ArchiveRecordWritable (future releases) instead.
Copy link
Member

Choose a reason for hiding this comment

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

Remove future releases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do, but to clarify, ArchiveRecordWritable will not exist until the changes in the RefactorLoader have been implemented.

@ruebot
Copy link
Member

ruebot commented Dec 6, 2017

$ mvn clean install
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ aut ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /home/nruest/git/aut/target/classes
[INFO] /home/nruest/git/aut/src/main/java/io/archivesunleashed/mapreduce/WacWarcInputFormat.java: /home/nruest/git/aut/src/main/java/io/archivesunleashed/mapreduce/WacWarcInputFormat.java uses or overrides a deprecated API.
[INFO] /home/nruest/git/aut/src/main/java/io/archivesunleashed/mapreduce/WacWarcInputFormat.java: Recompile with -Xlint:deprecation for details.

...

[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ aut ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /home/nruest/git/aut/target/test-classes
[INFO] /home/nruest/git/aut/src/test/java/io/archivesunleashed/io/ArcRecordWritableTest.java: Some input files use or override a deprecated API.
[INFO] /home/nruest/git/aut/src/test/java/io/archivesunleashed/io/ArcRecordWritableTest.java: Recompile with -Xlint:deprecation for details.
$ mvn -DcompilerArgument=-Xlint:deprecation clean install

[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ aut ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /home/nruest/git/aut/target/classes
[INFO] /home/nruest/git/aut/src/main/java/io/archivesunleashed/mapreduce/WacWarcInputFormat.java: /home/nruest/git/aut/src/main/java/io/archivesunleashed/mapreduce/WacWarcInputFormat.java uses or overrides a deprecated API.
[INFO] /home/nruest/git/aut/src/main/java/io/archivesunleashed/mapreduce/WacWarcInputFormat.java: Recompile with -Xlint:deprecation for details.

...

[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ aut ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /home/nruest/git/aut/target/test-classes
[INFO] /home/nruest/git/aut/src/test/java/io/archivesunleashed/io/ArcRecordWritableTest.java: Some input files use or override a deprecated API.
[INFO] /home/nruest/git/aut/src/test/java/io/archivesunleashed/io/ArcRecordWritableTest.java: Recompile with -Xlint:deprecation for details.

I'm good to go once @lintool is good to go.

Copy link
Member

@lintool lintool left a comment

Choose a reason for hiding this comment

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

lgtm

@ruebot
Copy link
Member

ruebot commented Dec 7, 2017

@greebie can you update, and then I'll merge?

@ruebot ruebot merged commit 47b5d26 into master Dec 7, 2017
@ruebot ruebot deleted the deprecations branch December 7, 2017 22:59
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.

3 participants