Exemplo n.º 1
0
 public void append(LogKey logKey, LogValue logValue) throws IOException {
   DataOutputStream out = this.writer.prepareAppendKey(-1);
   logKey.write(out);
   out.close();
   out = this.writer.prepareAppendValue(-1);
   logValue.write(out);
   out.close();
 }
Exemplo n.º 2
0
 public void writeApplicationOwner(String user) throws IOException {
   DataOutputStream out = this.writer.prepareAppendKey(-1);
   APPLICATION_OWNER_KEY.write(out);
   out.close();
   out = this.writer.prepareAppendValue(-1);
   out.writeUTF(user);
   out.close();
 }
Exemplo n.º 3
0
 private void writeVersion() throws IOException {
   DataOutputStream out = this.writer.prepareAppendKey(-1);
   VERSION_KEY.write(out);
   out.close();
   out = this.writer.prepareAppendValue(-1);
   out.writeInt(VERSION);
   out.close();
 }
Exemplo n.º 4
0
 public void writeApplicationACLs(Map<ApplicationAccessType, String> appAcls)
     throws IOException {
   DataOutputStream out = this.writer.prepareAppendKey(-1);
   APPLICATION_ACL_KEY.write(out);
   out.close();
   out = this.writer.prepareAppendValue(-1);
   for (Entry<ApplicationAccessType, String> entry : appAcls.entrySet()) {
     out.writeUTF(entry.getKey().toString());
     out.writeUTF(entry.getValue());
   }
   out.close();
 }