Package com.alimama.mdrill.editlog

Examples of com.alimama.mdrill.editlog.AddOp


  public final FSEditLogOpCodes opCode;
  public long txid;
  final public static class OpInstanceCache {
    private HashMap<FSEditLogOpCodes, FSEditLogOp> inst =  new HashMap<FSEditLogOpCodes, FSEditLogOp>();
    public OpInstanceCache() {
      inst.put(FSEditLogOpCodes.OP_ADD, new AddOp());
    }
View Full Code Here


   
    this.status.lastAddDocumentTime.set(System.currentTimeMillis());
    if(writelog)
    {
      try {
        AddOp op=new AddOp();
        op.setDoc(doc);
        synchronized (editlog) {
          if(!needRollLogs.get())
          {
            editlog.openForWrite();
            needRollLogs.set(true);
View Full Code Here

      {
        for(EditLogInputStream stream:streams)
        {
          while(true)
          {
            AddOp op=null;
            try {
              op = (AddOp) stream.readOp();
              if (op == null) {
                  LOG.error("readOp end");

                break;
              }
              if(op.getDoc()==null)
              {
                  LOG.error("readOp doc null");

                continue;
              }
            } catch (Throwable e) {
              LOG.error("readOp", e);
              break;
            }
           
            SolrInputDocument doc=op.getDoc();
            doc.setTxid(op.getTransactionId());
            if(lines<100000)
            {
              lines++;
              if(lines%500==0)
              {
View Full Code Here

   
    this.status.lastAddDocumentTime.set(System.currentTimeMillis());
    if(writelog)
    {
      try {
        AddOp op=new AddOp();
        op.setDoc(doc);
        synchronized (editlog) {
          if(!needRollLogs.get())
          {
            editlog.openForWrite();
            needRollLogs.set(true);
View Full Code Here

      {
        for(EditLogInputStream stream:streams)
        {
          while(true)
          {
            AddOp op=null;
            try {
              op = (AddOp) stream.readOp();
              if (op == null) {
                  LOG.error("readOp end");

                break;
              }
              if(op.getDoc()==null)
              {
                  LOG.error("readOp doc null");

                continue;
              }
            } catch (Throwable e) {
              LOG.error("readOp", e);
              break;
            }
           
            SolrInputDocument doc=op.getDoc();
            doc.setTxid(op.getTransactionId());
            if(lines<100000)
            {
              lines++;
              if(lines%500==0)
              {
View Full Code Here

TOP

Related Classes of com.alimama.mdrill.editlog.AddOp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.