Skip to content

Commit

Permalink
Merge branch 'mbalassi-getters' containing getters for unexposed Wind…
Browse files Browse the repository at this point in the history
…owFn fields
  • Loading branch information
davorbonaci committed May 12, 2015
2 parents 6fbb53e + a96562f commit 5b5e631
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ public boolean isCompatible(WindowFn other) {
&& startDate == that.startDate
&& timeZone == that.timeZone;
}

public int getNumber() {
return number;
}

public DateTime getStartDate() {
return startDate;
}

public DateTimeZone getTimeZone() {
return timeZone;
}

}

/**
Expand Down Expand Up @@ -218,6 +231,23 @@ public boolean isCompatible(WindowFn other) {
&& startDate == that.startDate
&& timeZone == that.timeZone;
}

public int getNumber() {
return number;
}

public int getDayOfMonth() {
return dayOfMonth;
}

public DateTime getStartDate() {
return startDate;
}

public DateTimeZone getTimeZone() {
return timeZone;
}

}

/**
Expand Down Expand Up @@ -299,5 +329,26 @@ public boolean isCompatible(WindowFn other) {
&& startDate == that.startDate
&& timeZone == that.timeZone;
}

public DateTimeZone getTimeZone() {
return timeZone;
}

public DateTime getStartDate() {
return startDate;
}

public int getDayOfMonth() {
return dayOfMonth;
}

public int getMonthOfYear() {
return monthOfYear;
}

public int getNumber() {
return number;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,13 @@ public boolean isCompatible(WindowFn<?, ?> other) {
&& (size.equals(((FixedWindows) other).size))
&& (offset.equals(((FixedWindows) other).offset));
}

public Duration getSize() {
return size;
}

public Duration getOffset() {
return offset;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,8 @@ public boolean isCompatible(WindowFn<?, ?> other) {
public IntervalWindow getSideInputWindow(BoundedWindow window) {
throw new UnsupportedOperationException("Sessions is not allowed in side inputs");
}

public Duration getGapDuration() {
return gapDuration;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,17 @@ static Duration getDefaultPeriod(Duration size) {
}
return Duration.millis(1);
}

public Duration getPeriod() {
return period;
}

public Duration getSize() {
return size;
}

public Duration getOffset() {
return offset;
}

}

0 comments on commit 5b5e631

Please sign in to comment.