Skip to content

Commit f249f27

Browse files
committed
comment and file cleanup
1 parent 958c187 commit f249f27

7 files changed

Lines changed: 475 additions & 11 deletions

File tree

bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/hbasesnapshots/ImportJobFromHbaseSnapshot.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,6 @@ static Pipeline buildPipelineWithMultipleSnapshots(
333333
return pipeline;
334334
}
335335
// Read records from hbase region files and write to Bigtable
336-
// PCollection<RegionConfig> hbaseRecords = restoredSnapshots
337-
// .apply("List Regions", new ListRegions());
338336
PCollection<KV<String, Iterable<Mutation>>> hbaseRecords =
339337
restoredSnapshots
340338
.apply("List Regions", new ListRegions())

bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/hbasesnapshots/SnapshotUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ public static Map<String, String> getSnapshotsFromSnapshotPath(
264264
// Build GCS path from given string e.g:
265265
// gs://sym-bucket/snapshots/20220309230526/.hbase-snapshot
266266
GcsPath gcsPath = GcsPath.fromUri(importSnapshotpath);
267-
// LOG.info("GCS Path:" + gcsPath + ";Object:" + gcsPath.getObject());
268267
Map<String, String> snapshots = new HashMap<>();
269268

270269
List<StorageObject> objects =

bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/hbasesnapshots/conf/SnapshotConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public static Builder builder() {
3838

3939
public abstract String getSourceLocation();
4040

41-
// public abstract Path getSourcePath();
4241
@Memoized
4342
public Path getSourcePath() {
4443
return new Path(getSourceLocation());

bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/hbasesnapshots/transforms/ListRegions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private Map<Long, Long> computeRegionSize(SnapshotManifest snapshotManifest) {
6767
regionsSize.put(regionManifest.getRegionInfo().getRegionId(), totalSize);
6868
}
6969

70-
return regionsSize; // (int)Math.ceil((totalSize * 1.0)/GIGA_BYTE);
70+
return regionsSize;
7171
}
7272

7373
/**

bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/hbasesnapshots/transforms/ReadRegions.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package com.google.cloud.bigtable.beam.hbasesnapshots.transforms;
1717

18-
// import com.google.cloud.bigtable.beam.hbasesnapshots.ImportSnapshots;
19-
2018
import com.google.api.core.InternalApi;
2119
import com.google.cloud.bigtable.beam.hbasesnapshots.conf.RegionConfig;
2220
import com.google.cloud.bigtable.beam.hbasesnapshots.conf.SnapshotConfig;
@@ -189,17 +187,14 @@ public void processElement(
189187
boolean hasSplit = false;
190188
try (HBaseRegionScanner scanner = newScanner(regionConfig, tracker.currentRestriction())) {
191189
for (Result result = scanner.next(); result != null; result = scanner.next()) {
192-
// if (flag==0 ) {
193190
if (tracker.tryClaim(ByteKey.copyFrom(result.getRow()))) {
194191
outputReceiver.output(KV.of(regionConfig.getSnapshotConfig(), result));
195192
} else {
196193
hasSplit = true;
197194
break;
198195
}
199-
// }
200196
}
201197
}
202-
// if (!hasSplit)
203198
tracker.tryClaim(ByteKey.EMPTY);
204199
}
205200

bigtable-dataflow-parent/bigtable-beam-import/src/test/java/com/google/cloud/bigtable/beam/hbasesnapshots/SnapshotUtilsTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ public void testgetSubSetSnapshotsFromSnapshotPath() throws IOException {
225225
getMatchingSnapshotsFromSnapshotPath(snapshotList, ".*attachments.*");
226226
List<String> expectedResult =
227227
snapshotList.stream().filter(e -> e.contains("attachments")).collect(Collectors.toList());
228-
// LOG.info("Matched:{} and expected:{}", snapshots.size(), expectedResult.size());
229228
assertThat(snapshots.size(), is(equalTo(expectedResult.size())));
230229
assertThat(snapshots.keySet(), containsInAnyOrder(expectedResult.toArray(new String[0])));
231230
}

0 commit comments

Comments
 (0)