Skip to content

Commit

Permalink
[HOPS-625] batch blocks removal
Browse files Browse the repository at this point in the history
  • Loading branch information
berthoug committed Aug 22, 2018
1 parent df5212b commit 9c94b7d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import io.hops.metadata.common.EntityDataAccess;

import java.util.Collection;
import java.util.List;

public interface EncodingStatusDataAccess<T> extends EntityDataAccess {

Expand All @@ -30,8 +31,12 @@ public interface EncodingStatusDataAccess<T> extends EntityDataAccess {

T findByInodeId(int inodeId) throws StorageException;

Collection<T> findByInodeIds(Collection<Integer> inodeIds) throws StorageException;

T findByParityInodeId(int inodeId) throws StorageException;

Collection<T> findByParityInodeIds(List<Integer> inodeIds) throws StorageException;

Collection<T> findRequestedEncodings(int limit) throws StorageException;

int countRequestedEncodings() throws StorageException;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/hops/metadata/hdfs/dal/INodeDataAccess.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public interface INodeDataAccess<T> extends EntityDataAccess {

T findInodeByIdFTIS(int inodeId) throws StorageException;

Collection<T> findInodesByIdsFTIS(int[] inodeId) throws StorageException;

List<T> findInodesByParentIdFTIS(int parentId) throws StorageException;

List<T> findInodesByParentIdAndPartitionIdPPIS(int parentId, int partitionId) throws StorageException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ public Class getType() {
public static enum Finder implements FinderType<EncodingStatus> {
/** Use the file id to find the status */
ByInodeId,
ByInodeIds,
/** Use the parity file id to find the status */
ByParityInodeId;
ByParityInodeId,
ByParityInodeIds;

@Override
public Class getType() {
Expand All @@ -107,8 +109,12 @@ public Annotation getAnnotated() {
switch (this) {
case ByInodeId:
return Annotation.PrimaryKey;
case ByInodeIds:
return Annotation.Batched;
case ByParityInodeId:
return Annotation.IndexScan;
case ByParityInodeIds:
return Annotation.IndexScan;
default:
throw new IllegalStateException();
}
Expand Down

0 comments on commit 9c94b7d

Please sign in to comment.