Java 类org.apache.hadoop.io.erasurecode.ECSchema 实例源码
项目:aliyun-oss-hadoop-fs
文件:TestErasureCodingPolicies.java
@Test(timeout = 60000)
public void testCreationErasureCodingZoneWithInvalidPolicy()
throws IOException {
ECSchema rsSchema = new ECSchema("rs", 4, 2);
String policyName = "RS-4-2-128k";
int cellSize = 128 * 1024;
ErasureCodingPolicy ecPolicy=
new ErasureCodingPolicy(policyName,rsSchema,cellSize);
String src = "/ecDir4-2";
final Path ecDir = new Path(src);
try {
fs.mkdir(ecDir, FsPermission.getDirDefault());
fs.getClient().setErasureCodingPolicy(src, ecPolicy);
fail("HadoopIllegalArgumentException should be thrown for"
+ "setting an invalid erasure coding policy");
} catch (Exception e) {
assertExceptionContains("Policy [ RS-4-2-128k ] does not match " +
"any of the supported policies",e);
}
}
项目:aliyun-oss-hadoop-fs
文件:PBHelperClient.java
public static ECSchema convertECSchema(HdfsProtos.ECSchemaProto schema) {
List<HdfsProtos.ECSchemaOptionEntryProto> optionsList =
schema.getOptionsList();
Map<String, String> options = new HashMap<>(optionsList.size());
for (HdfsProtos.ECSchemaOptionEntryProto option : optionsList) {
options.put(option.getKey(), option.getValue());
}
return new ECSchema(schema.getCodecName(), schema.getDataUnits(),
schema.getParityUnits(), options);
}
项目:aliyun-oss-hadoop-fs
文件:PBHelperClient.java
public static HdfsProtos.ECSchemaProto convertECSchema(ECSchema schema) {
HdfsProtos.ECSchemaProto.Builder builder =
HdfsProtos.ECSchemaProto.newBuilder()
.setCodecName(schema.getCodecName())
.setDataUnits(schema.getNumDataUnits())
.setParityUnits(schema.getNumParityUnits());
Set<Map.Entry<String, String>> entrySet =
schema.getExtraOptions().entrySet();
for (Map.Entry<String, String> entry : entrySet) {
builder.addOptions(HdfsProtos.ECSchemaOptionEntryProto.newBuilder()
.setKey(entry.getKey()).setValue(entry.getValue()).build());
}
return builder.build();
}
项目:hadoop-oss
文件:HHXORErasureDecoder.java
public HHXORErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:HHXORErasureEncoder.java
public HHXORErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:XORErasureDecoder.java
public XORErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:RSErasureEncoder.java
public RSErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:XORErasureEncoder.java
public XORErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:AbstractErasureEncoder.java
public AbstractErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:AbstractErasureDecoder.java
public AbstractErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:AbstractErasureCoder.java
public AbstractErasureCoder(ECSchema schema) {
this(schema.getNumDataUnits(), schema.getNumParityUnits());
}
项目:hadoop-oss
文件:RSErasureDecoder.java
public RSErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hadoop-oss
文件:XORErasureCodec.java
public XORErasureCodec(ECSchema schema) {
super(schema);
assert(schema.getNumParityUnits() == 1);
}
项目:hadoop-oss
文件:AbstractErasureCodec.java
public AbstractErasureCodec(ECSchema schema) {
this.schema = schema;
}
项目:hadoop-oss
文件:AbstractErasureCodec.java
public ECSchema getSchema() {
return schema;
}
项目:hadoop-oss
文件:RSErasureCodec.java
public RSErasureCodec(ECSchema schema) {
super(schema);
}
项目:aliyun-oss-hadoop-fs
文件:ErasureCodingPolicy.java
public ErasureCodingPolicy(String name, ECSchema schema, int cellSize){
this.name = name;
this.schema = schema;
this.cellSize = cellSize;
}
项目:aliyun-oss-hadoop-fs
文件:ErasureCodingPolicy.java
public ECSchema getSchema() {
return schema;
}
项目:aliyun-oss-hadoop-fs
文件:XORErasureDecoder.java
public XORErasureDecoder(ECSchema schema) {
super(schema);
}
项目:aliyun-oss-hadoop-fs
文件:RSErasureEncoder.java
public RSErasureEncoder(ECSchema schema) {
super(schema);
}
项目:aliyun-oss-hadoop-fs
文件:XORErasureEncoder.java
public XORErasureEncoder(ECSchema schema) {
super(schema);
}
项目:aliyun-oss-hadoop-fs
文件:AbstractErasureEncoder.java
public AbstractErasureEncoder(ECSchema schema) {
super(schema);
}
项目:aliyun-oss-hadoop-fs
文件:AbstractErasureDecoder.java
public AbstractErasureDecoder(ECSchema schema) {
super(schema);
}
项目:aliyun-oss-hadoop-fs
文件:AbstractErasureCoder.java
public AbstractErasureCoder(ECSchema schema) {
this(schema.getNumDataUnits(), schema.getNumParityUnits());
}
项目:aliyun-oss-hadoop-fs
文件:RSErasureDecoder.java
public RSErasureDecoder(ECSchema schema) {
super(schema);
}
项目:aliyun-oss-hadoop-fs
文件:XORErasureCodec.java
public XORErasureCodec(ECSchema schema) {
super(schema);
assert(schema.getNumParityUnits() == 1);
}
项目:aliyun-oss-hadoop-fs
文件:AbstractErasureCodec.java
public AbstractErasureCodec(ECSchema schema) {
this.schema = schema;
}
项目:aliyun-oss-hadoop-fs
文件:AbstractErasureCodec.java
public ECSchema getSchema() {
return schema;
}
项目:aliyun-oss-hadoop-fs
文件:RSErasureCodec.java
public RSErasureCodec(ECSchema schema) {
super(schema);
}
项目:hops
文件:HHXORErasureDecoder.java
public HHXORErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:HHXORErasureEncoder.java
public HHXORErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:XORErasureDecoder.java
public XORErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:RSErasureEncoder.java
public RSErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:XORErasureEncoder.java
public XORErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:AbstractErasureEncoder.java
public AbstractErasureEncoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:AbstractErasureDecoder.java
public AbstractErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:AbstractErasureCoder.java
public AbstractErasureCoder(ECSchema schema) {
this(schema.getNumDataUnits(), schema.getNumParityUnits());
}
项目:hops
文件:RSErasureDecoder.java
public RSErasureDecoder(ECSchema schema) {
super(schema);
}
项目:hops
文件:HHXORErasureCodec.java
public HHXORErasureCodec(ECSchema schema) {
super(schema);
}
项目:hops
文件:AbstractErasureCodec.java
public AbstractErasureCodec(ECSchema schema) {
this.schema = schema;
}