Runs the transform process
@param record the record to transform
@return the transformed record
356844
public SingleCSVRecord transform(SingleCSVRecord record) {
        List<Writable> record2 = toArrowWritablesSingle(
                toArrowColumnsStringSingle(bufferAllocator,
                        transformProcess.getInitialSchema(),record.getValues()),
                transformProcess.getInitialSchema());
        List<Writable> finalRecord = execute(Arrays.asList(record2),transformProcess).get(0);
        String[] values = new String[finalRecord.size()];
        for (int i = 0; i < values.length; i++)
            values[i] = finalRecord.get(i).toString();
        return new SingleCSVRecord(values);

    }
1053165
@SuppressWarnings("unchecked")
  private void processRecord(Object convertedRecord, ForkOperator forkOperator, RowLevelPolicyChecker rowChecker,
      RowLevelPolicyCheckResults rowResults, int branches, AcknowledgableWatermark watermark)
      throws Exception {
    // Skip the record if quality checking fails
    if (!rowChecker.executePolicies(convertedRecord, rowResults)) {
      if (watermark != null) {
        watermark.ack();
      }
      return;
    }

    List<Boolean> forkedRecords = forkOperator.forkDataRecord(this.taskState, convertedRecord);
    if (forkedRecords.size() != branches) {
      throw new ForkBranchMismatchException(String
          .format("Number of forked data records [%d] is not equal to number of branches [%d]", forkedRecords.size(),
              branches));
    }

    boolean needToCopy = inMultipleBranches(forkedRecords);
    // we only have to copy a record if it needs to go into multiple forks
    if (needToCopy && !(CopyHelper.isCopyable(convertedRecord))) {
      throw new CopyNotSupportedException(convertedRecord.getClass().getName() + " is not copyable");
    }

    int branch = 0;
    int copyInstance = 0;
    for (Optional<Fork> fork : this.forks.keySet()) {
      if (fork.isPresent() && forkedRecords.get(branch)) {
        Object recordForFork = needToCopy ? CopyHelper.copy(convertedRecord) : convertedRecord;
        copyInstance++;
        if (isStreamingTask()) {
          // Send the record, watermark pair down the fork
          ((RecordEnvelope) recordForFork).addCallBack(watermark.incrementAck());
        }
        // Put the record into the record queue of each fork. A put may timeout and return a false, in which
        // case the put is retried until it is successful.
        boolean succeeded = false;
        while (!succeeded) {
          succeeded = fork.get().putRecord(recordForFork);
        }
      }
      branch++;
    }
    if (watermark != null) {
      watermark.ack();
    }
  }
985436
def emit(self, record):
        
        # if we've already processed this record, ignore it
        if record in self._recordQueue:
            return
        
        name = record.name
        lvl = self.loggerLevel(name)
        
        # don't process this log
        if lvl > record.levelno:
            return
        
        self._recordQueue.insert(0, record)
        self._recordQueue = self._recordQueue[:10]
        
        # emit the change
        super(XLogRecordHandler, self).emit(record)
758935
public static Object convert(String dataType, Object record){
		if(record == null){return null;}
		if(dataType.equals(UUID)){
			return java.util.UUID.fromString(record.toString());
		}
		//TODO: add a lot of else if here for the other data types
		else{
			return record;
		}
	}
756637
public BaseTable doMakeTable(Record record)
    {
        if (((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.MEMORY)
            || ((record.getDatabaseType() & DBConstants.TABLE_TYPE_MASK) == DBConstants.UNSHAREABLE_MEMORY))
        {
        	BaseDatabase database = (BaseDatabase)this.getDatabaseOwner().getDatabase(DBParams.MEMORY, record.getDatabaseType(), null);
        	return database.doMakeTable(record);
        }
        else
            return null;
    }
777217
@Override
    public synchronized void writeRecord(String record) {
        long length = record.length() + LoggingConstants.nlen;
        PrintStream ps = getPrintStream(length);
        ps.println(record);
        if (ps.checkError()) {
            setStreamStatus(StreamStatus.CLOSED, null, null, DummyOutputStream.psInstance);
            // to avoid junit test to print an error message
            if (System.getProperty("test.classesDir") == null && System.getProperty("test.buildDir") == null) {
                System.err.println(Tr.formatMessage(getTc(), "FAILED_TO_WRITE_LOG", new Object[] { getPrimaryFile().getAbsolutePath() }));
            }
        }
    }
207656
public StringRecordBuilder<D> add(String record) {
    this.records.add(apply(checkNotNull(record, "record")));
    return this;
  }
217428
@Override
  public String format(LogRecord record) {
    String msg = record.getMessage();
    if(msg.length() > 0) {
      if (record instanceof ProgressLogRecord) {
        return msg;
      }
      if(msg.endsWith(OutputStreamLogger.NEWLINE)) {
        return msg;
      }
    }
    return msg + OutputStreamLogger.NEWLINE;
  }
848773
@Override
	public String format(LogRecord record) {
		/*String loggerName = record.getLoggerName();
		if (loggerName == null) {
			loggerName = "root";
		}*/
		// .append(loggerName)
		return "[" +
				StringUtils.repeat(" ", 8 - record.getLevel().toString().length()) +
				record.getLevel() + '|' +
				StringUtils.repeat(" ", 12 - Thread.currentThread().getName().length()) +
				Thread.currentThread().getName() + '|' +
				format.format(new Date(record.getMillis())) +
				"]: " +
				record.getMessage() + ' ' +
				lineSep;
	}
1125531
protected void run(Pattern separator,
                       String input,
                       List<Record> output) throws IOException, URISyntaxException {
        run(null, separator.pattern(), true, false, input, output);
    }
738623
public void setRecord(Rec record)
    {
        if (m_tableNext != null)
            m_tableNext.setRecord(record);  // Must be synchronized
        super.setRecord(record);
    }
995957
public Record moveToCurrentRecord(Record recBase)
    {
        if (recBase == null)
            recBase = this.getBaseRecord(); // Actually, should always be the recBase.
        BaseField fldRecordType = recBase.getSharedRecordTypeKey();
        Object objKey = fldRecordType.getData();
        BaseTable tableCurrent = this.getTableAt(objKey);
        Record recCurrent = null;
        if (tableCurrent != null)
            recCurrent = tableCurrent.getRecord();
        if (recCurrent == null)
        {
            RecordOwner recordOwner = recBase.getRecordOwner();
            RecordOwner recordOwnerFake = this.getFakeRecordOwner(recordOwner);
            recCurrent = recBase.createSharedRecord(objKey, recordOwnerFake);
            if (recCurrent != null)
                if (recCurrent.getRecordOwner() == recordOwnerFake)
            {   // Usually
                recCurrent.setRecordOwner(recordOwner);    // No record owner
                // Add this table (but do not use this.addTable because it closes the next table)
                this.addTable(objKey, recCurrent.getTable());
                recCurrent.setOpenMode(recBase.getOpenMode());  // Same mode.
                recBase.matchListeners(recCurrent, true, true, true, true, true);      // Clone the listeners that are not there already.
            }
        }
        if (recCurrent != null)
            if (recCurrent != recBase)
        {
            this.copyRecordInfo(recCurrent, recBase, true, false);
        }
        if (recCurrent != null)
            this.setCurrentRecord(recCurrent);
        return recCurrent;
    }
131289
public List evaluate(Record record) {
    // fast path (not functionally necessary):
    if (fields.size() == 1) {
      Object first = fields.get(0);
      if (first instanceof String) {
        return Collections.singletonList(first);
      } else {
        String ref = ((Field) first).getName();
        if (ref.length() != 0) {
          List resolvedValues = record.get(ref);
          return resolvedValues;
        }
      }
    }

    // slow path:
    ArrayList<Object> results = new ArrayList<Object>(1);
    evaluate2(0, record, new StringBuilder(), results);
    return results;
  }
114797
@Override
	public void log(LogRecord record) {
		record.setMessage(maskPassword(record.getMessage()));
		super.log(record);
	}
1118575
public BaseTable doMakeTable(Record record)
    {
        BaseTable table = null;
        boolean bIsQueryRecord = record.isQueryRecord();
        if (m_pDatabase == null)
        {
            try   {
                this.open();
            } catch (DBException ex)    {
                return null;        // No database
            }
        }
        if (bIsQueryRecord)
        { // Physical Tables cannot process SQL queries, so use QueryTable!
            PassThruTable passThruTable = new QueryTable(this, record);
            passThruTable.addTable(record.getRecordlistAt(0).getTable());
            return passThruTable;
        }
        table = this.makePhysicalTable(record);
        return table;
    }
402216
public static String createXMLStringRecord(Record record)
    {
        String string = DBConstants.BLANK;

        DocumentBuilder db = Utility.getDocumentBuilder();
        DocumentBuilder stringdb = Utility.getDocumentBuilder();
        Document doc = null;
        synchronized (db)
        {
            doc = db.newDocument();

            Element elRoot = (Element)doc.createElement(ROOT_TAG);
            doc.appendChild(elRoot);
            try   {
                XmlInOut.enableAllBehaviors(record, false, true); // Disable file behaviors
    
                createXMLRecord(stringdb, record, doc, elRoot);
    
                elRoot.appendChild(doc.createTextNode(XmlUtilities.NEWLINE));
            } catch (DBException ex)    {
                ex.printStackTrace();
                return DBConstants.BLANK;
            }
        }
        try   {
            StringWriter out = new StringWriter();  //, MIME2Java.convert("UTF-8"));

            // Use a Transformer for output
            TransformerFactory tFactory = TransformerFactory.newInstance();
            Transformer transformer = tFactory.newTransformer();

            DOMSource source = new DOMSource(doc);
            StreamResult result = new StreamResult(out);
            transformer.transform(source, result);
            out.close();
            string = out.toString();

            int iStartString = string.indexOf("<" + ROOT_TAG + ">") + 3 + ROOT_TAG.length();
            int iEndString = string.indexOf("</" + ROOT_TAG + ">");
            if (iStartString >= iEndString)
                string = DBConstants.BLANK;
            else
                string = string.substring(iStartString, iEndString);
        } catch (TransformerConfigurationException tce) {
            // Error generated by the parser
            tce.printStackTrace();
        } catch (TransformerException te) {
            // Error generated by the parser
            te.printStackTrace();
        } catch (Exception ex)  {
            ex.printStackTrace();
        }
        XmlInOut.enableAllBehaviors(record, true, true);
        return string;
    }
865811
public static HttpOperation toHttpOperation(GenericRecord record) {
    if (record instanceof HttpOperation) {
      return (HttpOperation) record;
    }

    HttpOperation.Builder builder = HttpOperation.newBuilder();

    Map<String, String> stringMap = AvroUtils.toStringMap(record.get(HttpConstants.KEYS));
    if (stringMap != null) {
      builder.setKeys(stringMap);
    }
    stringMap = AvroUtils.toStringMap(record.get(HttpConstants.QUERY_PARAMS));
    if (stringMap != null) {
      builder.setQueryParams(stringMap);
    }
    stringMap = AvroUtils.toStringMap(record.get(HttpConstants.HEADERS));
    if (stringMap != null) {
      builder.setHeaders(stringMap);
    }
    Object body = record.get(HttpConstants.BODY);
    if (body != null) {
      builder.setBody(body.toString());
    }

    return builder.build();
  }