Skip to content

Commit

Permalink
deprecate MapReduce elements
Browse files Browse the repository at this point in the history
fixes #1273
  • Loading branch information
evanchooly committed Nov 11, 2018
1 parent 109cadb commit a39543b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions morphia/src/main/java/xyz/morphia/Datastore.java
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@ public interface Datastore {
* @param options the options to apply to the map/reduce job
* @return the results
* @since 1.3
* @deprecated This feature will not be supported in 2.0
*/
@Deprecated
<T> MapreduceResults<T> mapReduce(MapReduceOptions<T> options);

/**
Expand All @@ -551,6 +553,7 @@ public interface Datastore {
* @param scopeFields Each map entry will be a global variable in all the functions; can be null
* @return counts and stuff
* @deprecated use {@link #mapReduce(MapReduceOptions)} instead
* @deprecated This feature will not be supported in 2.0
*/
@Deprecated
<T> MapreduceResults<T> mapReduce(MapreduceType type, Query q, String map, String reduce, String finalize,
Expand All @@ -566,6 +569,7 @@ <T> MapreduceResults<T> mapReduce(MapreduceType type, Query q, String map, Strin
* @param baseCommand The base command to fill in and send to the server
* @return counts and stuff
* @deprecated use {@link #mapReduce(MapReduceOptions)} instead
* @deprecated This feature will not be supported in 2.0
*/
@Deprecated
<T> MapreduceResults<T> mapReduce(MapreduceType type, Query q, Class<T> outputType, MapReduceCommand baseCommand);
Expand Down
2 changes: 2 additions & 0 deletions morphia/src/main/java/xyz/morphia/MapReduceOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
*
* @param <T> the type of the output
* @since 1.3
* @deprecated This feature will not be supported in 2.0
*/
@Deprecated
public class MapReduceOptions<T> {
private String outputDB;
private String outputCollection;
Expand Down
2 changes: 2 additions & 0 deletions morphia/src/main/java/xyz/morphia/MapreduceResults.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
* Stores the results of a map reduce operation
*
* @param <T> the type of the results
* @deprecated This feature will not be supported in 2.0
*/
@NotSaved
@SuppressWarnings("deprecation")
@Deprecated
public class MapreduceResults<T> implements Iterable<T> {
private static final Logger LOG = MorphiaLoggerFactory.get(MapreduceResults.class);
private final Stats counts = new Stats();
Expand Down

0 comments on commit a39543b

Please sign in to comment.