out.writeBoolean(lazy);
        out.writeBoolean(collocated);
    }

package org.apache.ignite.internal.visor.query;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.visor.VisorDataTransferObject;

/**
 * Arguments for {@link VisorQueryTask}.
 */
public class VisorQueryTaskArg extends VisorDataTransferObject {

    private static final long serialVersionUID = 0L;

    /**
     * Cache name for query.
     */
    private String cacheName;

    /**
     * Query text.
     */
    private String qryTxt;

    /**
     * Distributed joins enabled flag.
     */
    private boolean distributedJoins;

    /**
     * Enforce join order flag.
     */
    private boolean enforceJoinOrder;

    /**
     * Query contains only replicated tables flag.
     */
    private boolean replicatedOnly;

    /**
     * Flag whether to execute query locally.
     */
    private boolean loc;

    /**
     * Result batch size.
     */
    private int pageSize;

    /**
     * Lazy query execution flag
     */
    private boolean lazy;

    /**
     * Collocation flag.
     */
    private boolean collocated;

    public VisorQueryTaskArg() {
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, false, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, lazy, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     * @param collocated Collocation flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy, boolean collocated) {
        this.cacheName = cacheName;
        this.qryTxt = qryTxt;
        this.distributedJoins = distributedJoins;
        this.enforceJoinOrder = enforceJoinOrder;
        this.replicatedOnly = replicatedOnly;
        this.loc = loc;
        this.pageSize = pageSize;
        this.lazy = lazy;
        this.collocated = collocated;
    }

    public String getCacheName() {
        return cacheName;
    }

    public String getQueryText() {
        return qryTxt;
    }

    /**
     * @return Distributed joins enabled flag.
     */
    public boolean isDistributedJoins() {
        return distributedJoins;
    }

    /**
     * @return Enforce join order flag.
     */
    public boolean isEnforceJoinOrder() {
        return enforceJoinOrder;
    }

    /**
     * @return {@code true} If the query contains only replicated tables.
     */
    public boolean isReplicatedOnly() {
        return replicatedOnly;
    }

    /**
     * @return {@code true} If query should be executed locally.
     */
    public boolean isLocal() {
        return loc;
    }

    public int getPageSize() {
        return pageSize;
    }

    /**
     * Lazy query execution flag.
     *
     * @return Lazy flag.
     */
    public boolean getLazy() {
        return lazy;
    }

    /**
     * Flag indicating if this query is collocated.
     *
     * @return {@code true} If the query is collocated.
     */
    public boolean isCollocated() {
        return collocated;
    }

    @Override
    public byte getProtocolVersion() {
        return V3;
    }

    @Override
    protected void writeExternalData(ObjectOutput out) throws IOException {
        U.writeString(out, cacheName);
        U.writeString(out, qryTxt);
        out.writeBoolean(distributedJoins);
        out.writeBoolean(enforceJoinOrder);
        out.writeBoolean(loc);
        out.writeInt(pageSize);

    @Override
    protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
        cacheName = U.readString(in);
        qryTxt = U.readString(in);
        distributedJoins = in.readBoolean();
        enforceJoinOrder = in.readBoolean();
        loc = in.readBoolean();
        pageSize = in.readInt();
        if (protoVer > V1)
            lazy = in.readBoolean();
        if (protoVer > V2)
            collocated = in.readBoolean();
    }

    @Override
    public String toString() {
        return S.toString(VisorQueryTaskArg.class, this);
    }
}


package org.apache.ignite.internal.visor.query;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.visor.VisorDataTransferObject;

/**
 * Arguments for {@link VisorQueryTask}.
 */
public class VisorQueryTaskArg extends VisorDataTransferObject {

    private static final long serialVersionUID = 0L;

    /**
     * Cache name for query.
     */
    private String cacheName;

    /**
     * Query text.
     */
    private String qryTxt;

    /**
     * Distributed joins enabled flag.
     */
    private boolean distributedJoins;

    /**
     * Enforce join order flag.
     */
    private boolean enforceJoinOrder;

    /**
     * Query contains only replicated tables flag.
     */
    private boolean replicatedOnly;

    /**
     * Flag whether to execute query locally.
     */
    private boolean loc;

    /**
     * Result batch size.
     */
    private int pageSize;

    /**
     * Lazy query execution flag
     */
    private boolean lazy;

    /**
     * Collocation flag.
     */
    private boolean collocated;

    public VisorQueryTaskArg() {
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, false, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, lazy, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     * @param collocated Collocation flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy, boolean collocated) {
        this.cacheName = cacheName;
        this.qryTxt = qryTxt;
        this.distributedJoins = distributedJoins;
        this.enforceJoinOrder = enforceJoinOrder;
        this.replicatedOnly = replicatedOnly;
        this.loc = loc;
        this.pageSize = pageSize;
        this.lazy = lazy;
        this.collocated = collocated;
    }

    public String getCacheName() {
        return cacheName;
    }

    public String getQueryText() {
        return qryTxt;
    }

    /**
     * @return Distributed joins enabled flag.
     */
    public boolean isDistributedJoins() {
        return distributedJoins;
    }

    /**
     * @return Enforce join order flag.
     */
    public boolean isEnforceJoinOrder() {
        return enforceJoinOrder;
    }

    /**
     * @return {@code true} If the query contains only replicated tables.
     */
    public boolean isReplicatedOnly() {
        return replicatedOnly;
    }

    /**
     * @return {@code true} If query should be executed locally.
     */
    public boolean isLocal() {
        return loc;
    }

    public int getPageSize() {
        return pageSize;
    }

    /**
     * Lazy query execution flag.
     *
     * @return Lazy flag.
     */
    public boolean getLazy() {
        return lazy;
    }

    /**
     * Flag indicating if this query is collocated.
     *
     * @return {@code true} If the query is collocated.
     */
    public boolean isCollocated() {
        return collocated;
    }

    @Override
    public byte getProtocolVersion() {
        return V3;
    }

    @Override
    protected void writeExternalData(ObjectOutput out) throws IOException {
        U.writeString(out, cacheName);
        U.writeString(out, qryTxt);
        out.writeBoolean(distributedJoins);
        out.writeBoolean(enforceJoinOrder);
        out.writeBoolean(loc);
        out.writeInt(pageSize);
        out.writeBoolean(lazy);
        out.writeBoolean(collocated);
    }

    @Override
    protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
        cacheName = U.readString(in);
        qryTxt = U.readString(in);
        distributedJoins = in.readBoolean();
        enforceJoinOrder = in.readBoolean();
        loc = in.readBoolean();
        pageSize = in.readInt();
        if (protoVer > V1)
            lazy = in.readBoolean();
        if (protoVer > V2)
            collocated = in.readBoolean();
    }

    @Override
    public String toString() {
        return S.toString(VisorQuer


public boolean isReplicatedOnly() {
        return replicatedOnly;
    }

package org.apache.ignite.internal.visor.query;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.visor.VisorDataTransferObject;

/**
 * Arguments for {@link VisorQueryTask}.
 */
public class VisorQueryTaskArg extends VisorDataTransferObject {

    private static final long serialVersionUID = 0L;

    /**
     * Cache name for query.
     */
    private String cacheName;

    /**
     * Query text.
     */
    private String qryTxt;

    /**
     * Distributed joins enabled flag.
     */
    private boolean distributedJoins;

    /**
     * Enforce join order flag.
     */
    private boolean enforceJoinOrder;

    /**
     * Query contains only replicated tables flag.
     */
    private boolean replicatedOnly;

    /**
     * Flag whether to execute query locally.
     */
    private boolean loc;

    /**
     * Result batch size.
     */
    private int pageSize;

    /**
     * Lazy query execution flag
     */
    private boolean lazy;

    /**
     * Collocation flag.
     */
    private boolean collocated;

    public VisorQueryTaskArg() {
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, false, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, lazy, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     * @param collocated Collocation flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy, boolean collocated) {
        this.cacheName = cacheName;
        this.qryTxt = qryTxt;
        this.distributedJoins = distributedJoins;
        this.enforceJoinOrder = enforceJoinOrder;
        this.replicatedOnly = replicatedOnly;
        this.loc = loc;
        this.pageSize = pageSize;
        this.lazy = lazy;
        this.collocated = collocated;
    }

    public String getCacheName() {
        return cacheName;
    }

    public String getQueryText() {
        return qryTxt;
    }

    /**
     * @return Distributed joins enabled flag.
     */
    public boolean isDistributedJoins() {
        return distributedJoins;
    }

    /**
     * @return Enforce join order flag.
     */
    public boolean isEnforceJoinOrder() {
        return enforceJoinOrder;
    }

    /**
     * @return {@code true} If the query contains only replicated tables.
     */

    /**
     * @return {@code true} If query should be executed locally.
     */
    public boolean isLocal() {
        return loc;
    }

    public int getPageSize() {
        return pageSize;
    }

    /**
     * Lazy query execution flag.
     *
     * @return Lazy flag.
     */
    public boolean getLazy() {
        return lazy;
    }

    /**
     * Flag indicating if this query is collocated.
     *
     * @return {@code true} If the query is collocated.
     */
    public boolean isCollocated() {
        return collocated;
    }

    @Override
    public byte getProtocolVersion() {
        return V3;
    }

    @Override
    protected void writeExternalData(ObjectOutput out) throws IOException {
        U.writeString(out, cacheName);
        U.writeString(out, qryTxt);
        out.writeBoolean(distributedJoins);
        out.writeBoolean(enforceJoinOrder);
        out.writeBoolean(loc);
        out.writeInt(pageSize);
        out.writeBoolean(lazy);
        out.writeBoolean(collocated);
    }

    @Override
    protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
        cacheName = U.readString(in);
        qryTxt = U.readString(in);
        distributedJoins = in.readBoolean();
        enforceJoinOrder = in.readBoolean();
        loc = in.readBoolean();
        pageSize = in.readInt();
        if (protoVer > V1)
            lazy = in.readBoolean();
        if (protoVer > V2)
            collocated = in.readBoolean();
    }

    @Override
    public String toString() {
        return S.toString(VisorQueryTaskArg.class, this);
    }
}


if (protoVer > V2)
            collocated = in.readBoolean();

package org.apache.ignite.internal.visor.query;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.visor.VisorDataTransferObject;

/**
 * Arguments for {@link VisorQueryTask}.
 */
public class VisorQueryTaskArg extends VisorDataTransferObject {

    private static final long serialVersionUID = 0L;

    /**
     * Cache name for query.
     */
    private String cacheName;

    /**
     * Query text.
     */
    private String qryTxt;

    /**
     * Distributed joins enabled flag.
     */
    private boolean distributedJoins;

    /**
     * Enforce join order flag.
     */
    private boolean enforceJoinOrder;

    /**
     * Query contains only replicated tables flag.
     */
    private boolean replicatedOnly;

    /**
     * Flag whether to execute query locally.
     */
    private boolean loc;

    /**
     * Result batch size.
     */
    private int pageSize;

    /**
     * Lazy query execution flag
     */
    private boolean lazy;

    /**
     * Collocation flag.
     */
    private boolean collocated;

    public VisorQueryTaskArg() {
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, false, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy) {
        this(cacheName, qryTxt, distributedJoins, enforceJoinOrder, replicatedOnly, loc, pageSize, lazy, false);
    }

    /**
     * @param cacheName Cache name for query.
     * @param qryTxt Query text.
     * @param distributedJoins If {@code true} then distributed joins enabled.
     * @param enforceJoinOrder If {@code true} then enforce join order.
     * @param replicatedOnly {@code true} then query contains only replicated tables.
     * @param loc Flag whether to execute query locally.
     * @param pageSize Result batch size.
     * @param lazy Lazy query execution flag.
     * @param collocated Collocation flag.
     */
    public VisorQueryTaskArg(String cacheName, String qryTxt, boolean distributedJoins, boolean enforceJoinOrder, boolean replicatedOnly, boolean loc, int pageSize, boolean lazy, boolean collocated) {
        this.cacheName = cacheName;
        this.qryTxt = qryTxt;
        this.distributedJoins = distributedJoins;
        this.enforceJoinOrder = enforceJoinOrder;
        this.replicatedOnly = replicatedOnly;
        this.loc = loc;
        this.pageSize = pageSize;
        this.lazy = lazy;
        this.collocated = collocated;
    }

    public String getCacheName() {
        return cacheName;
    }

    public String getQueryText() {
        return qryTxt;
    }

    /**
     * @return Distributed joins enabled flag.
     */
    public boolean isDistributedJoins() {
        return distributedJoins;
    }

    /**
     * @return Enforce join order flag.
     */
    public boolean isEnforceJoinOrder() {
        return enforceJoinOrder;
    }

    /**
     * @return {@code true} If the query contains only replicated tables.
     */
    public boolean isReplicatedOnly() {
        return replicatedOnly;
    }

    /**
     * @return {@code true} If query should be executed locally.
     */
    public boolean isLocal() {
        return loc;
    }

    public int getPageSize() {
        return pageSize;
    }

    /**
     * Lazy query execution flag.
     *
     * @return Lazy flag.
     */
    public boolean getLazy() {
        return lazy;
    }

    /**
     * Flag indicating if this query is collocated.
     *
     * @return {@code true} If the query is collocated.
     */
    public boolean isCollocated() {
        return collocated;
    }

    @Override
    public byte getProtocolVersion() {
        return V3;
    }

    @Override
    protected void writeExternalData(ObjectOutput out) throws IOException {
        U.writeString(out, cacheName);
        U.writeString(out, qryTxt);
        out.writeBoolean(distributedJoins);
        out.writeBoolean(enforceJoinOrder);
        out.writeBoolean(loc);
        out.writeInt(pageSize);
        out.writeBoolean(lazy);
        out.writeBoolean(collocated);
    }

    @Override
    protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
        cacheName = U.readString(in);
        qryTxt = U.readString(in);
        distributedJoins = in.readBoolean();
        enforceJoinOrder = in.readBoolean();
        loc = in.readBoolean();
        pageSize = in.readInt();
        if (protoVer > V1)
            lazy = in.readBoolean();

    }

    @Override
    public String toString() {
        return S.toString(VisorQueryTaskArg.class, this);
    }
}


@Override
    public ITupleParser createTupleParser(final IHyracksTaskContext ctx)

package org.apache.hyracks.dataflow.std.file;

import java.io.DataOutput;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParserFactory;

/**
 * Currently used by tests only. Reconsider the code when it will be used otherwise.
 */
public class DelimitedDataTupleParserFactory implements ITupleParserFactory {

    private static final long serialVersionUID = 1L;

    private IValueParserFactory[] valueParserFactories;

    private char fieldDelimiter;

    private char quote;

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter) {
        this(fieldParserFactories, fieldDelimiter, '\"');
    }

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter, char quote) {
        this.valueParserFactories = fieldParserFactories;
        this.fieldDelimiter = fieldDelimiter;
        this.quote = quote;
    }

{
        return new ITupleParser() {

            final IWarningCollector warningCollector = ctx.getWarningCollector();

            @Override
            public void parse(InputStream in, IFrameWriter writer) throws HyracksDataException {
                try {
                    IValueParser[] valueParsers = new IValueParser[valueParserFactories.length];
                    for (int i = 0; i < valueParserFactories.length; ++i) {
                        valueParsers[i] = valueParserFactories[i].createValueParser();
                    }
                    IFrame frame = new VSizeFrame(ctx);
                    FrameTupleAppender appender = new FrameTupleAppender();
                    appender.reset(frame, true);
                    ArrayTupleBuilder tb = new ArrayTupleBuilder(valueParsers.length);
                    DataOutput dos = tb.getDataOutput();
                    FieldCursorForDelimitedDataParser cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote, warningCollector, () -> "");
                    while (cursor.nextRecord()) {
                        tb.reset();
                        for (int i = 0; i < valueParsers.length; ++i) {
                            FieldCursorForDelimitedDataParser.Result result = cursor.nextField();
                            switch(result) {
                                case OK:
                                    break;
                                case END:
                                case ERROR:
                                    throw new HyracksDataException("Failed to parse record");
                                default:
                                    throw new IllegalStateException();
                            }
                            // Eliminate double quotes in the field that we are going to parse
                            if (cursor.fieldHasDoubleQuote()) {
                                cursor.eliminateDoubleQuote();
                            }
                            if (!valueParsers[i].parse(cursor.getBuffer(), cursor.getFieldStart(), cursor.getFieldLength(), dos)) {
                                throw new HyracksDataException("Failed to parse field");
                            }
                            tb.addFieldEndOffset();
                        }
                        FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
                    }
                    appender.write(writer, true);
                } catch (IOException e) {
                    throw HyracksDataException.create(e);
                }
            }
        };
    }
}


package org.apache.hyracks.dataflow.std.file;

import java.io.DataOutput;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParserFactory;

/**
 * Currently used by tests only. Reconsider the code when it will be used otherwise.
 */
public class DelimitedDataTupleParserFactory implements ITupleParserFactory {

    private static final long serialVersionUID = 1L;

    private IValueParserFactory[] valueParserFactories;

    private char fieldDelimiter;

    private char quote;

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter) {
        this(fieldParserFactories, fieldDelimiter, '\"');
    }

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter, char quote) {
        this.valueParserFactories = fieldParserFactories;
        this.fieldDelimiter = fieldDelimiter;
        this.quote = quote;
    }

    @Override
    public ITupleParser createTupleParser(final IHyracksTaskContext ctx) {

        return new ITupleParser() {

            final IWarningCollector warningCollector = ctx.getWarningCollector();

            @Override
            public void parse(InputStream in, IFrameWriter writer) throws HyracksDataException {
                try {
                    IValueParser[] valueParsers = new IValueParser[valueParserFactories.length];
                    for (int i = 0; i < valueParserFactories.length; ++i) {
                        valueParsers[i] = valueParserFactories[i].createValueParser();
                    }
                    IFrame frame = new VSizeFrame(ctx);
                    FrameTupleAppender appender = new FrameTupleAppender();
                    appender.reset(frame, true);
                    ArrayTupleBuilder tb = new ArrayTupleBuilder(valueParsers.length);
                    DataOutput dos = tb.getDataOutput();
                    FieldCursorForDelimitedDataParser cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote, warningCollector, () -> "");
                    while (cursor.nextRecord()) {
                        tb.reset();
                        for (int i = 0; i < valueParsers.length; ++i) {
                            FieldCursorForDelimitedDataParser.Result result = cursor.nextField();
                            switch(result) {
                                case OK:
                                    break;
                                case END:
                                case ERROR:
                                    throw new HyracksDataException("Failed to parse record");
                                default:
                                    throw new IllegalStateException();
                            }
                            // Eliminate double quotes in the field that we are going to parse
                            if (cursor.fieldHasDoubleQuote()) {
                                cursor.eliminateDoubleQuote();
                            }
                            if (!valueParsers[i].parse(cursor.getBuffer(), cursor.getFieldStart(), cursor.getFieldLength(), dos)) {
                                throw new HyracksDataException("Failed to parse field");
                            }
                            tb.addFieldEndOffset();
                        }
                        FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
                    }
                    appender.write(writer, true);
                } catch (IOException e) {
                    throw HyracksDataException.create(e);
                }
            }
        };
    }
}


return new ITupleParser() {

            final IWarningCollector warningCollector = ctx.getWarningCollector();

            @Override
            public void parse(InputStream in, IFrameWriter writer) throws HyracksDataException {
                try {
                    IValueParser[] valueParsers = new IValueParser[valueParserFactories.length];
                    for (int i = 0; i < valueParserFactories.length; ++i) {
                        valueParsers[i] = valueParserFactories[i].createValueParser();
                    }
                    IFrame frame = new VSizeFrame(ctx);
                    FrameTupleAppender appender = new FrameTupleAppender();
                    appender.reset(frame, true);
                    ArrayTupleBuilder tb = new ArrayTupleBuilder(valueParsers.length);
                    DataOutput dos = tb.getDataOutput();
                    FieldCursorForDelimitedDataParser cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote, warningCollector, () -> "");
                    while (cursor.nextRecord()) {
                        tb.reset();
                        for (int i = 0; i < valueParsers.length; ++i) {
                            FieldCursorForDelimitedDataParser.Result result = cursor.nextField();
                            switch(result) {
                                case OK:
                                    break;
                                case END:
                                case ERROR:
                                    throw new HyracksDataException("Failed to parse record");
                                default:
                                    throw new IllegalStateException();
                            }
                            // Eliminate double quotes in the field that we are going to parse
                            if (cursor.fieldHasDoubleQuote()) {
                                cursor.eliminateDoubleQuote();
                            }
                            if (!valueParsers[i].parse(cursor.getBuffer(), cursor.getFieldStart(), cursor.getFieldLength(), dos)) {
                                throw new HyracksDataException("Failed to parse field");
                            }
                            tb.addFieldEndOffset();
                        }
                        FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
                    }
                    appender.write(writer, true);
                } catch (IOException e) {
                    throw HyracksDataException.create(e);
                }
            }
        };


package org.apache.hyracks.dataflow.std.file;

import java.io.DataOutput;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParserFactory;

/**
 * Currently used by tests only. Reconsider the code when it will be used otherwise.
 */
public class DelimitedDataTupleParserFactory implements ITupleParserFactory {

    private static final long serialVersionUID = 1L;

    private IValueParserFactory[] valueParserFactories;

    private char fieldDelimiter;

    private char quote;

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter) {
        this(fieldParserFactories, fieldDelimiter, '\"');
    }

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter, char quote) {
        this.valueParserFactories = fieldParserFactories;
        this.fieldDelimiter = fieldDelimiter;
        this.quote = quote;
    }

    @Override
    public ITupleParser createTupleParser(final IHyracksTaskContext ctx) {
        return new ITupleParser() {

            final IWarningCollector warningCollector = ctx.getWarningCollector();

            @Override
            public void parse(InputStream in, IFrameWriter writer) throws HyracksDataException {
                try {
                    IValueParser[] valueParsers = new IValueParser[valueParserFactories.length];
                    for (int i = 0; i < valueParserFactories.length; ++i) {
                        valueParsers[i] = valueParserFactories[i].createValueParser();
                    }
                    IFrame frame = new VSizeFrame(ctx);
                    FrameTupleAppender appender = new FrameTupleAppender();
                    appender.reset(frame, true);
                    ArrayTupleBuilder tb = new ArrayTupleBuilder(valueParsers.length);
                    DataOutput dos = tb.getDataOutput();
                    FieldCursorForDelimitedDataParser cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote, warningCollector, () -> "");
                    while (cursor.nextRecord()) {
                        tb.reset();
                        for (int i = 0; i < valueParsers.length; ++i) {
                            FieldCursorForDelimitedDataParser.Result result = cursor.nextField();
                            switch(result) {
                                case OK:
                                    break;
                                case END:
                                case ERROR:
                                    throw new HyracksDataException("Failed to parse record");
                                default:
                                    throw new IllegalStateException();
                            }
                            // Eliminate double quotes in the field that we are going to parse
                            if (cursor.fieldHasDoubleQuote()) {
                                cursor.eliminateDoubleQuote();
                            }
                            if (!valueParsers[i].parse(cursor.getBuffer(), cursor.getFieldStart(), cursor.getFieldLength(), dos)) {
                                throw new HyracksDataException("Failed to parse field");
                            }
                            tb.addFieldEndOffset();
                        }
                        FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
                    }
                    appender.write(writer, true);
                } catch (IOException e) {
                    throw HyracksDataException.create(e);
                }
            }
        };


if (!valueParsers[i].parse(cursor.getBuffer(), cursor.getFieldStart(), cursor.getFieldLength(), dos)) {
                                throw new HyracksDataException("Failed to parse field");
                            }

package org.apache.hyracks.dataflow.std.file;

import java.io.DataOutput;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParserFactory;

/**
 * Currently used by tests only. Reconsider the code when it will be used otherwise.
 */
public class DelimitedDataTupleParserFactory implements ITupleParserFactory {

    private static final long serialVersionUID = 1L;

    private IValueParserFactory[] valueParserFactories;

    private char fieldDelimiter;

    private char quote;

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter) {
        this(fieldParserFactories, fieldDelimiter, '\"');
    }

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter, char quote) {
        this.valueParserFactories = fieldParserFactories;
        this.fieldDelimiter = fieldDelimiter;
        this.quote = quote;
    }

    @Override
    public ITupleParser createTupleParser(final IHyracksTaskContext ctx) {
        return new ITupleParser() {

            final IWarningCollector warningCollector = ctx.getWarningCollector();

            @Override
            public void parse(InputStream in, IFrameWriter writer) throws HyracksDataException {
                try {
                    IValueParser[] valueParsers = new IValueParser[valueParserFactories.length];
                    for (int i = 0; i < valueParserFactories.length; ++i) {
                        valueParsers[i] = valueParserFactories[i].createValueParser();
                    }
                    IFrame frame = new VSizeFrame(ctx);
                    FrameTupleAppender appender = new FrameTupleAppender();
                    appender.reset(frame, true);
                    ArrayTupleBuilder tb = new ArrayTupleBuilder(valueParsers.length);
                    DataOutput dos = tb.getDataOutput();
                    FieldCursorForDelimitedDataParser cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote, warningCollector, () -> "");
                    while (cursor.nextRecord()) {
                        tb.reset();
                        for (int i = 0; i < valueParsers.length; ++i) {
                            FieldCursorForDelimitedDataParser.Result result = cursor.nextField();
                            switch(result) {
                                case OK:
                                    break;
                                case END:
                                case ERROR:
                                    throw new HyracksDataException("Failed to parse record");
                                default:
                                    throw new IllegalStateException();
                            }
                            // Eliminate double quotes in the field that we are going to parse
                            if (cursor.fieldHasDoubleQuote()) {
                                cursor.eliminateDoubleQuote();
                            }

                            tb.addFieldEndOffset();
                        }
                        FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
                    }
                    appender.write(writer, true);
                } catch (IOException e) {
                    throw HyracksDataException.create(e);
                }
            }
        };
    }
}


switch(result) {
                                case OK:
                                    break;
                                case END:
                                case ERROR:
                                    throw new HyracksDataException("Failed to parse record");
                                default:
                                    throw new IllegalStateException();
                            }

package org.apache.hyracks.dataflow.std.file;

import java.io.DataOutput;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParserFactory;

/**
 * Currently used by tests only. Reconsider the code when it will be used otherwise.
 */
public class DelimitedDataTupleParserFactory implements ITupleParserFactory {

    private static final long serialVersionUID = 1L;

    private IValueParserFactory[] valueParserFactories;

    private char fieldDelimiter;

    private char quote;

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter) {
        this(fieldParserFactories, fieldDelimiter, '\"');
    }

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter, char quote) {
        this.valueParserFactories = fieldParserFactories;
        this.fieldDelimiter = fieldDelimiter;
        this.quote = quote;
    }

    @Override
    public ITupleParser createTupleParser(final IHyracksTaskContext ctx) {
        return new ITupleParser() {

            final IWarningCollector warningCollector = ctx.getWarningCollector();

            @Override
            public void parse(InputStream in, IFrameWriter writer) throws HyracksDataException {
                try {
                    IValueParser[] valueParsers = new IValueParser[valueParserFactories.length];
                    for (int i = 0; i < valueParserFactories.length; ++i) {
                        valueParsers[i] = valueParserFactories[i].createValueParser();
                    }
                    IFrame frame = new VSizeFrame(ctx);
                    FrameTupleAppender appender = new FrameTupleAppender();
                    appender.reset(frame, true);
                    ArrayTupleBuilder tb = new ArrayTupleBuilder(valueParsers.length);
                    DataOutput dos = tb.getDataOutput();
                    FieldCursorForDelimitedDataParser cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote, warningCollector, () -> "");
                    while (cursor.nextRecord()) {
                        tb.reset();
                        for (int i = 0; i < valueParsers.length; ++i) {
                            FieldCursorForDelimitedDataParser.Result result = cursor.nextField();

                            // Eliminate double quotes in the field that we are going to parse
                            if (cursor.fieldHasDoubleQuote()) {
                                cursor.eliminateDoubleQuote();
                            }
                            if (!valueParsers[i].parse(cursor.getBuffer(), cursor.getFieldStart(), cursor.getFieldLength(), dos)) {
                                throw new HyracksDataException("Failed to parse field");
                            }
                            tb.addFieldEndOffset();
                        }
                        FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
                    }
                    appender.write(writer, true);
                } catch (IOException e) {
                    throw HyracksDataException.create(e);
                }
            }
        };
    }
}


for (int i = 0; i < valueParserFactories.length; ++i) {
                        valueParsers[i] = valueParserFactories[i].createValueParser();
                    }

package org.apache.hyracks.dataflow.std.file;

import java.io.DataOutput;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.exceptions.IWarningCollector;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender;
import org.apache.hyracks.dataflow.common.comm.util.FrameUtils;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
import org.apache.hyracks.dataflow.common.data.parsers.IValueParserFactory;

/**
 * Currently used by tests only. Reconsider the code when it will be used otherwise.
 */
public class DelimitedDataTupleParserFactory implements ITupleParserFactory {

    private static final long serialVersionUID = 1L;

    private IValueParserFactory[] valueParserFactories;

    private char fieldDelimiter;

    private char quote;

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter) {
        this(fieldParserFactories, fieldDelimiter, '\"');
    }

    public DelimitedDataTupleParserFactory(IValueParserFactory[] fieldParserFactories, char fieldDelimiter, char quote) {
        this.valueParserFactories = fieldParserFactories;
        this.fieldDelimiter = fieldDelimiter;
        this.quote = quote;
    }

    @Override
    public ITupleParser createTupleParser(final IHyracksTaskContext ctx) {
        return new ITupleParser() {

            final IWarningCollector warningCollector = ctx.getWarningCollector();

            @Override
            public void parse(InputStream in, IFrameWriter writer) throws HyracksDataException {
                try {
                    IValueParser[] valueParsers = new IValueParser[valueParserFactories.length];

                    IFrame frame = new VSizeFrame(ctx);
                    FrameTupleAppender appender = new FrameTupleAppender();
                    appender.reset(frame, true);
                    ArrayTupleBuilder tb = new ArrayTupleBuilder(valueParsers.length);
                    DataOutput dos = tb.getDataOutput();
                    FieldCursorForDelimitedDataParser cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote, warningCollector, () -> "");
                    while (cursor.nextRecord()) {
                        tb.reset();
                        for (int i = 0; i < valueParsers.length; ++i) {
                            FieldCursorForDelimitedDataParser.Result result = cursor.nextField();
                            switch(result) {
                                case OK:
                                    break;
                                case END:
                                case ERROR:
                                    throw new HyracksDataException("Failed to parse record");
                                default:
                                    throw new IllegalStateException();
                            }
                            // Eliminate double quotes in the field that we are going to parse
                            if (cursor.fieldHasDoubleQuote()) {
                                cursor.eliminateDoubleQuote();
                            }
                            if (!valueParsers[i].parse(cursor.getBuffer(), cursor.getFieldStart(), cursor.getFieldLength(), dos)) {
                                throw new HyracksDataException("Failed to parse field");
                            }
                            tb.addFieldEndOffset();
                        }
                        FrameUtils.appendToWriter(writer, appender, tb.getFieldEndOffsets(), tb.getByteArray(), 0, tb.getSize());
                    }
                    appender.write(writer, true);
                } catch (IOException e) {
                    throw HyracksDataException.create(e);
                }
            }
        };
    }
}


@Provides
    @Singleton
    @ForBaseJdbc
    public ConnectionFactory getConnectionFactory(BaseJdbcConfig config, CredentialProvider credentialProvider)

package io.trino.plugin.postgresql;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
import io.airlift.configuration.AbstractConfigurationAwareModule;
import io.trino.plugin.jdbc.BaseJdbcConfig;
import io.trino.plugin.jdbc.ConnectionFactory;
import io.trino.plugin.jdbc.DecimalModule;
import io.trino.plugin.jdbc.DriverConnectionFactory;
import io.trino.plugin.jdbc.ForBaseJdbc;
import io.trino.plugin.jdbc.JdbcClient;
import io.trino.plugin.jdbc.RemoteQueryCancellationModule;
import io.trino.plugin.jdbc.credential.CredentialProvider;
import org.postgresql.Driver;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider;

public class PostgreSqlClientModule extends AbstractConfigurationAwareModule {

    @Override
    public void setup(Binder binder) {
        binder.bind(JdbcClient.class).annotatedWith(ForBaseJdbc.class).to(PostgreSqlClient.class).in(Scopes.SINGLETON);
        configBinder(binder).bindConfig(PostgreSqlConfig.class);
        bindSessionPropertiesProvider(binder, PostgreSqlSessionProperties.class);
        install(new DecimalModule());
        install(new RemoteQueryCancellationModule());
    }

{
        return new DriverConnectionFactory(new Driver(), config, credentialProvider);
    }
}


{
        binder.bind(JdbcClient.class).annotatedWith(ForBaseJdbc.class).to(PostgreSqlClient.class).in(Scopes.SINGLETON);
        configBinder(binder).bindConfig(PostgreSqlConfig.class);
        bindSessionPropertiesProvider(binder, PostgreSqlSessionProperties.class);
        install(new DecimalModule());
        install(new RemoteQueryCancellationModule());
    }

package io.trino.plugin.postgresql;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
import io.airlift.configuration.AbstractConfigurationAwareModule;
import io.trino.plugin.jdbc.BaseJdbcConfig;
import io.trino.plugin.jdbc.ConnectionFactory;
import io.trino.plugin.jdbc.DecimalModule;
import io.trino.plugin.jdbc.DriverConnectionFactory;
import io.trino.plugin.jdbc.ForBaseJdbc;
import io.trino.plugin.jdbc.JdbcClient;
import io.trino.plugin.jdbc.RemoteQueryCancellationModule;
import io.trino.plugin.jdbc.credential.CredentialProvider;
import org.postgresql.Driver;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider;

public class PostgreSqlClientModule extends AbstractConfigurationAwareModule {

    @Override
    public void setup(Binder binder)

    @Provides
    @Singleton
    @ForBaseJdbc
    public ConnectionFactory getConnectionFactory(BaseJdbcConfig config, CredentialProvider credentialProvider) {
        return new DriverConnectionFactory(new Driver(), config, credentialProvider);
    }
}


        binder.bind(JdbcClient.class).annotatedWith(ForBaseJdbc.class).to(PostgreSqlClient.class).in(Scopes.SINGLETON);
        configBinder(binder).bindConfig(PostgreSqlConfig.class);

package io.trino.plugin.postgresql;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
import io.airlift.configuration.AbstractConfigurationAwareModule;
import io.trino.plugin.jdbc.BaseJdbcConfig;
import io.trino.plugin.jdbc.ConnectionFactory;
import io.trino.plugin.jdbc.DecimalModule;
import io.trino.plugin.jdbc.DriverConnectionFactory;
import io.trino.plugin.jdbc.ForBaseJdbc;
import io.trino.plugin.jdbc.JdbcClient;
import io.trino.plugin.jdbc.RemoteQueryCancellationModule;
import io.trino.plugin.jdbc.credential.CredentialProvider;
import org.postgresql.Driver;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider;

public class PostgreSqlClientModule extends AbstractConfigurationAwareModule {

    @Override
    public void setup(Binder binder) {

        bindSessionPropertiesProvider(binder, PostgreSqlSessionProperties.class);
        install(new DecimalModule());
        install(new RemoteQueryCancellationModule());
    }

    @Provides
    @Singleton
    @ForBaseJdbc
    public ConnectionFactory getConnectionFactory(BaseJdbcConfig config, CredentialProvider credentialProvider) {
        return new DriverConnectionFactory(new Driver(), config, credentialProvider);
    }
}


bindSessionPropertiesProvider(binder, PostgreSqlSessionProperties.class);
        install(new DecimalModule());

package io.trino.plugin.postgresql;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
import io.airlift.configuration.AbstractConfigurationAwareModule;
import io.trino.plugin.jdbc.BaseJdbcConfig;
import io.trino.plugin.jdbc.ConnectionFactory;
import io.trino.plugin.jdbc.DecimalModule;
import io.trino.plugin.jdbc.DriverConnectionFactory;
import io.trino.plugin.jdbc.ForBaseJdbc;
import io.trino.plugin.jdbc.JdbcClient;
import io.trino.plugin.jdbc.RemoteQueryCancellationModule;
import io.trino.plugin.jdbc.credential.CredentialProvider;
import org.postgresql.Driver;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider;

public class PostgreSqlClientModule extends AbstractConfigurationAwareModule {

    @Override
    public void setup(Binder binder) {
        binder.bind(JdbcClient.class).annotatedWith(ForBaseJdbc.class).to(PostgreSqlClient.class).in(Scopes.SINGLETON);
        configBinder(binder).bindConfig(PostgreSqlConfig.class);

        install(new RemoteQueryCancellationModule());
    }

    @Provides
    @Singleton
    @ForBaseJdbc
    public ConnectionFactory getConnectionFactory(BaseJdbcConfig config, CredentialProvider credentialProvider) {
        return new DriverConnectionFactory(new Driver(), config, credentialProvider);
    }
}


install(new RemoteQueryCancellationModule());
    }

package io.trino.plugin.postgresql;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
import io.airlift.configuration.AbstractConfigurationAwareModule;
import io.trino.plugin.jdbc.BaseJdbcConfig;
import io.trino.plugin.jdbc.ConnectionFactory;
import io.trino.plugin.jdbc.DecimalModule;
import io.trino.plugin.jdbc.DriverConnectionFactory;
import io.trino.plugin.jdbc.ForBaseJdbc;
import io.trino.plugin.jdbc.JdbcClient;
import io.trino.plugin.jdbc.RemoteQueryCancellationModule;
import io.trino.plugin.jdbc.credential.CredentialProvider;
import org.postgresql.Driver;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider;

public class PostgreSqlClientModule extends AbstractConfigurationAwareModule {

    @Override
    public void setup(Binder binder) {
        binder.bind(JdbcClient.class).annotatedWith(ForBaseJdbc.class).to(PostgreSqlClient.class).in(Scopes.SINGLETON);
        configBinder(binder).bindConfig(PostgreSqlConfig.class);
        bindSessionPropertiesProvider(binder, PostgreSqlSessionProperties.class);
        install(new DecimalModule());


package io.trino.plugin.postgresql;

import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
import io.airlift.configuration.AbstractConfigurationAwareModule;
import io.trino.plugin.jdbc.BaseJdbcConfig;
import io.trino.plugin.jdbc.ConnectionFactory;
import io.trino.plugin.jdbc.DecimalModule;
import io.trino.plugin.jdbc.DriverConnectionFactory;
import io.trino.plugin.jdbc.ForBaseJdbc;
import io.trino.plugin.jdbc.JdbcClient;
import io.trino.plugin.jdbc.RemoteQueryCancellationModule;
import io.trino.plugin.jdbc.credential.CredentialProvider;
import org.postgresql.Driver;
import static io.airlift.configuration.ConfigBinder.configBinder;
import static io.trino.plugin.jdbc.JdbcModule.bindSessionPropertiesProvider;

public class PostgreSqlClientModule extends AbstractConfigurationAwareModule {

    @Override
    public void setup(Binder binder) {
        binder.bind(JdbcClient.class).annotatedWith(ForBaseJdbc.class).to(PostgreSqlClient.class).in(Scopes.SINGLETON);
        configBinder(binder).bindConfig(PostgreSqlConfig.clas


@Override
    public void handleMessage(Message msg)

package com.androidnetworking.internal;

import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.androidnetworking.common.ANConstants;
import com.androidnetworking.interfaces.UploadProgressListener;
import com.androidnetworking.model.Progress;

/**
 * Created by amitshekhar on 24/05/16.
 */
public class UploadProgressHandler extends Handler {

    private final UploadProgressListener mUploadProgressListener;

    public UploadProgressHandler(UploadProgressListener uploadProgressListener) {
        super(Looper.getMainLooper());
        mUploadProgressListener = uploadProgressListener;
    }

{
        switch(msg.what) {
            case ANConstants.UPDATE:
                if (mUploadProgressListener != null) {
                    final Progress progress = (Progress) msg.obj;
                    mUploadProgressListener.onProgress(progress.currentBytes, progress.totalBytes);
                }
                break;
            default:
                super.handleMessage(msg);
                break;
        }
    }
}


{
        switch(msg.what) {
            case ANConstants.UPDATE:
                if (mUploadProgressListener != null) {
                    final Progress progress = (Progress) msg.obj;
                    mUploadProgressListener.onProgress(progress.currentBytes, progress.totalBytes);
                }
                break;
            default:
                super.handleMessage(msg);
                break;
        }
    }

package com.androidnetworking.internal;

import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.androidnetworking.common.ANConstants;
import com.androidnetworking.interfaces.UploadProgressListener;
import com.androidnetworking.model.Progress;

/**
 * Created by amitshekhar on 24/05/16.
 */
public class UploadProgressHandler extends Handler {

    private final UploadProgressListener mUploadProgressListener;

    public UploadProgressHandler(UploadProgressListener uploadProgressListener) {
        super(Looper.getMainLooper());
        mUploadProgressListener = uploadProgressListener;
    }

    @Override
    public void handleMessage(Message msg)


package com.androidnetworking.internal;

import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.androidnetworking.common.ANConstants;
import com.androidnetworking.interfaces.UploadProgressListener;
import com.androidnetworking.model.Progress;

/**
 * Created by amitshekhar on 24/05/16.
 */
public class UploadProgressHandler extends Handler {

    private final UploadProgressListener mUploadProgressListener;

    public UploadProgressHandler(UploadProgressListener uploadProgressListener) {
        super(Looper.getMainLooper());
        mUploadProgressListener = uploadProgressListener;
    }

    @Override
    public void handleMessage(Message msg) {

        switch(msg.what) {
            case ANConstants.UPDATE:
                if (mUploadProgressListener != null) {
                    final Progress progress = (Progress) msg.obj;
                    mUploadProgressListener.onProgress(progress.currentBytes, progress.totalBytes);
                }
                break;
            default:
                super.handleMessage(msg);
                break;
        }
    }
}


switch(msg.what) {
            case ANConstants.UPDATE:
                if (mUploadProgressListener != null) {
                    final Progress progress = (Progress) msg.obj;
                    mUploadProgressListener.onProgress(progress.currentBytes, progress.totalBytes);
                }
                break;
            default:
                super.handleMessage(msg);
                break;
        }


package com.androidnetworking.internal;

import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.androidnetworking.common.ANConstants;
import com.androidnetworking.interfaces.UploadProgressListener;
import com.androidnetworking.model.Progress;

/**
 * Created by amitshekhar on 24/05/16.
 */
public class UploadProgressHandler extends Handler {

    private final UploadProgressListener mUploadProgressListener;

    public UploadProgressHandler(UploadProgressListener uploadProgressListener) {
        super(Looper.getMainLooper());
        mUploadProgressListener = uploadProgressListener;
    }

    @Override
    public void handleMessage(Message msg) {
        switch(msg.what) {
            case ANConstants.UPDATE:
                if (mUploadProgressListener != null) {
                    final Progress progress = (Progress) msg.obj;
                    mUploadProgressListener.onProgress(progress.currentBytes, progress.totalBytes);
                }
                break;
            default:
                super.handleMessage(msg);
                break;
        }


if (mUploadProgressListener != null) {
                    final Progress progress = (Progress) msg.obj;
                    mUploadProgressListener.onProgress(progress.currentBytes, progress.totalBytes);
                }

package com.androidnetworking.internal;

import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.androidnetworking.common.ANConstants;
import com.androidnetworking.interfaces.UploadProgressListener;
import com.androidnetworking.model.Progress;

/**
 * Created by amitshekhar on 24/05/16.
 */
public class UploadProgressHandler extends Handler {

    private final UploadProgressListener mUploadProgressListener;

    public UploadProgressHandler(UploadProgressListener uploadProgressListener) {
        super(Looper.getMainLooper());
        mUploadProgressListener = uploadProgressListener;
    }

    @Override
    public void handleMessage(Message msg) {
        switch(msg.what) {
            case ANConstants.UPDATE:

                break;
            default:
                super.handleMessage(msg);
                break;
        }
    }
}


package com.github.lybgeek.user.service;

import com.github.lybgeek.user.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

public interface UserService extends IService<User> {

    void saveAndMockLongTimeNotity(User user);

    void saveAndMockExceptionCall(User user);

    /**
     * 基于事件驱动
     * @param user
     */


public static void logThrowableCrash(Throwable throwable)

package com.team254.lib.util;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.UUID;

/**
 * Tracks start-up and caught crash events, logging them to a file which dosn't roll over
 */
public class CrashTracker {

    private static final UUID RUN_INSTANCE_UUID = UUID.randomUUID();

    public static void logRobotStartup() {
        logMarker("robot startup");
    }

    public static void logRobotConstruction() {
        logMarker("robot startup");
    }

    public static void logRobotInit() {
        logMarker("robot init");
    }

    public static void logTeleopInit() {
        logMarker("teleop init");
    }

    public static void logAutoInit() {
        logMarker("auto init");
    }

    public static void logDisabledInit() {
        logMarker("disabled init");
    }

{
        logMarker("Exception", throwable);
    }

    private static void logMarker(String mark) {
        logMarker(mark, null);
    }

    private static void logMarker(String mark, Throwable nullableException) {
        try (PrintWriter writer = new PrintWriter(new FileWriter("/home/lvuser/crash_tracking.txt", true))) {
            writer.print(RUN_INSTANCE_UUID.toString());
            writer.print(", ");
            writer.print(mark);
            writer.print(", ");
            writer.print(new Date().toString());
            if (nullableException != null) {
                writer.print(", ");
                nullableException.printStackTrace(writer);
            }
            writer.println();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


{
        logMarker("disabled init");
    }

package com.team254.lib.util;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.UUID;

/**
 * Tracks start-up and caught crash events, logging them to a file which dosn't roll over
 */
public class CrashTracker {

    private static final UUID RUN_INSTANCE_UUID = UUID.randomUUID();

    public static void logRobotStartup() {
        logMarker("robot startup");
    }

    public static void logRobotConstruction() {
        logMarker("robot startup");
    }

    public static void logRobotInit() {
        logMarker("robot init");
    }

    public static void logTeleopInit() {
        logMarker("teleop init");
    }

    public static void logAutoInit() {
        logMarker("auto init");
    }

    public static void logDisabledInit()

    public static void logThrowableCrash(Throwable throwable) {
        logMarker("Exception", throwable);
    }

    private static void logMarker(String mark) {
        logMarker(mark, null);
    }

    private static void logMarker(String mark, Throwable nullableException) {
        try (PrintWriter writer = new PrintWriter(new FileWriter("/home/lvuser/crash_tracking.txt", true))) {
            writer.print(RUN_INSTANCE_UUID.toString());
            writer.print(", ");
            writer.print(mark);
            writer.print(", ");
            writer.print(new Date().toString());
            if (nullableException != null) {
                writer.print(", ");
                nullableException.printStackTrace(writer);
            }
            writer.println();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


package com.team254.lib.util;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.UUID;

/**
 * Tracks start-up and caught crash events, logging them to a file which dosn't roll over
 */
public class CrashTracker {

    private static final UUID RUN_INSTANCE_UUID = UUID.randomUUID();

    public static void logRobotStartup() {
        logMarker("robot startup");
    }

    public static void logRobotConstruction() {
        logMarker("robot startup");
    }

    public static void logRobotInit() {
        logMarker("robot init");
    }

    public static void logTeleopInit() {
        logMarker("teleop init");
    }

    public static void logAutoInit() {
        logMarker("auto init");
    }

    public static void logDisabledInit() {
        logMarker("disabled init");
    }

    public static void logThrowableCrash(Throwable throwable) {
        logMarker("Exception", throwable);
    }

    private static void logMarker(String mark) {
        logMarker(mark, null);
    }

    private static void logMarker(String mark, Throwable nullableException) {

        try (PrintWriter writer = new PrintWriter(new FileWriter("/home/lvuser/crash_tracking.txt", true))) {
            writer.print(RUN_INSTANCE_UUID.toString());
            writer.print(", ");
            writer.print(mark);
            writer.print(", ");
            writer.print(new Date().toString());
            if (nullableException != null) {
                writer.print(", ");
                nullableException.printStackTrace(writer);
            }
            writer.println();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


try (PrintWriter writer = new PrintWriter(new FileWriter("/home/lvuser/crash_tracking.txt", true))) {
            writer.print(RUN_INSTANCE_UUID.toString());
            writer.print(", ");
            writer.print(mark);
            writer.print(", ");
            writer.print(new Date().toString());
            if (nullableException != null) {
                writer.print(", ");
                nullableException.printStackTrace(writer);
            }
            writer.println();
        } catch (IOException e) {
            e.printStackTrace();
        }


package com.team254.lib.util;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.UUID;

/**
 * Tracks start-up and caught crash events, logging them to a file which dosn't roll over
 */
public class CrashTracker {

    private static final UUID RUN_INSTANCE_UUID = UUID.randomUUID();

    public static void logRobotStartup() {
        logMarker("robot startup");
    }

    public static void logRobotConstruction() {
        logMarker("robot startup");
    }

    public static void logRobotInit() {
        logMarker("robot init");
    }

    public static void logTeleopInit() {
        logMarker("teleop init");
    }

    public static void logAutoInit() {
        logMarker("auto init");
    }

    public static void logDisabledInit() {
        logMarker("disabled init");
    }

    public static void logThrowableCrash(Throwable throwable) {
        logMarker("Exception", throwable);
    }

    private static void logMarker(String mark) {
        logMarker(mark, null);
    }

    private static void logMarker(String mark, Throwable nullableException) {
        try (PrintWriter writer = new PrintWriter(new FileWriter("/home/lvuser/crash_tracking.txt", true))) {
            writer.print(RUN_INSTANCE_UUID.toString());
            writer.print(", ");
            writer.print(mark);
            writer.print(", ");
            writer.print(new Date().toString());
            if (nullableException != null) {
                writer.print(", ");
                nullableException.printStackTrace(writer);
            }
            writer.println();
        } catch (IOException e) {
            e.printStackTrace();
        }


package com.team254.lib.util;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.UUID;

/**
 * Tracks start-up and caught crash events, logging them to a file which dosn't roll over
 */
public class CrashTracker {

    private static final UUID RUN_INSTANCE_UUID = UUID.randomUUID();

    public static void logRobotStartup() {
        logMarker("robot startup");
    }

    public static void logRobotConstruction() {
        logMarker("robot startup");
    }

    public static void logRobotInit() {
        logMarker("robot init");
    }

    public static void logTeleopInit() {
        logMarker("teleop init");
    }

    public static void logAutoInit() {
        logMarker("auto init");
    }

    public static void logDisabledInit() {

    }

    public static void logThrowableCrash(Throwable throwable) {
        logMarker("Exception", throwable);
    }

    private static void logMarker(String mark) {
        logMarker(mark, null);
    }

    private static void logMarker(String mark, Throwable nullableException) {
        try (PrintWriter writer = new PrintWriter(new FileWriter("/home/lvuser/crash_tracking.txt", true))) {
            writer.print(RUN_INSTANCE_UUID.toString());
            writer.print(", ");
            writer.print(mark);
            writer.print(", ");
            writer.print(new Date().toString());
            if (nullableException != null) {
                writer.print(", ");
                nullableException.printStackTrace(writer);
            }
            writer.println();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


if (nullableException != null) {
                writer.print(", ");
                nullableException.printStackTrace(writer);
            }

package com.team254.lib.util;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.UUID;

/**
 * Tracks start-up and caught crash events, logging them to a file which dosn't roll over
 */
public class CrashTracker {

    private static final UUID RUN_INSTANCE_UUID = UUID.randomUUID();

    public static void logRobotStartup() {
        logMarker("robot startup");
    }

    public static void logRobotConstruction() {
        logMarker("robot startup");
    }

    public static void logRobotInit() {
        logMarker("robot init");
    }

    public static void logTeleopInit() {
        logMarker("teleop init");
    }

    public static void logAutoInit() {
        logMarker("auto init");
    }

    public static void logDisabledInit() {
        logMarker("disabled init");
    }

    public static void logThrowableCrash(Throwable throwable) {
        logMarker("Exception", throwable);
    }

    private static void logMarker(String mark) {
        logMarker(mark, null);
    }

    private static void logMarker(String mark, Throwable nullableException) {
        try (PrintWriter writer = new PrintWriter(new FileWriter("/home/lvuser/crash_tracking.txt", true))) {
            writer.print(RUN_INSTANCE_UUID.toString());
            writer.print(", ");
            writer.print(mark);
            writer.print(", ");
            writer.print(new Date().toString());

            writer.println();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


/**
 * This file was converted to Java from the original LLVM source file. The original
 * source file follows the LLVM Release License, outlined below.
 *
 * ==============================================================================
 *
 * All rights reserved.
 *
 * Developed by:
 *
 *     LLVM Team
 *
 *     University of Illinois at Urbana-Champaign
 *
 *     http://llvm.org
 *
 * ==============================================================================
 * Copyrights and Licenses for Third Party Software Distributed with LLVM:
 * ==============================================================================
 *
 * The following pieces of software have additional or alternate copyrights,
 * licenses, and/or restrictions:
 *
 * Program             Directory
 * -------             ---------
 * Autoconf            llvm/autoconf
 *                     llvm/projects/ModuleMaker/autoconf
 * Google Test         llvm/utils/unittest/googletest
 * OpenBSD regex       llvm/lib/Support/{reg*, COPYRIGHT.regex}
 * pyyaml tests        llvm/test/YAMLParser/{*.data, LICENSE.TXT}
 * ARM contributions   llvm/lib/Target/ARM/LICENSE.TXT
 * md5 contributions   llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h
 */
package org.clang.frontend.impl;

import org.clank.support.*;
import org.llvm.adt.*;
import org.clang.serialization.*;
import org.clang.frontend.*;

// / Private implementations for ModuleDependencyCollector
@Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 28, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 26, FQN = "(anonymous namespace)::ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerE", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerE")
public class ModuleDependencyListener extends ASTReaderListener implements Destructors.ClassWithDestructor {

    private ModuleDependencyCollector Collector;

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 31, FQN = "(anonymous namespace)::ModuleDependencyListener::ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerC1ERN5clang25ModuleDependencyCollectorE", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerC1ERN5clang25ModuleDependencyCollectorE")
    public ModuleDependencyListener(ModuleDependencyCollector Collector) {
        // START JInit
        super();
        this.Collector = Collector;
        // END JInit
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 33, FQN = "(anonymous namespace)::ModuleDependencyListener::needsInputFileVisitation", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener24needsInputFileVisitationEv", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener24needsInputFileVisitationEv")
    @Override
    public boolean needsInputFileVisitation() /* override*/
    {
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 34, FQN = "(anonymous namespace)::ModuleDependencyListener::needsSystemInputFileVisitation", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener30needsSystemInputFileVisitationEv", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener30needsSystemInputFileVisitationEv")
    @Override
    public boolean needsSystemInputFileVisitation() /* override*/
    {
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 35, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 87, FQN = "(anonymous namespace)::ModuleDependencyListener::visitInputFile", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener14visitInputFileEN4llvm9StringRefEbbb", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener14visitInputFileEN4llvm9StringRefEbbb")
    @Override
    public boolean visitInputFile(StringRef Filename, boolean IsSystem, boolean IsOverridden, boolean IsExplicitModule) /* override*/
    {
        Collector.addFile(new StringRef(Filename));
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 28, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 26, FQN = "(anonymous namespace)::ModuleDependencyListener::~ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerD0Ev", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerD0Ev")
    @Override
    public /*inline*/
    void $destroy() {
        super.$destroy();
    }

{
        return // NOI18N
        "" + "Collector=" + Collector + // NOI18N
        super.toString();
    }
}


{
        return // NOI18N
        "" + "Collector=" + Collector + // NOI18N
        super.toString();
    }

/**
 * This file was converted to Java from the original LLVM source file. The original
 * source file follows the LLVM Release License, outlined below.
 *
 * ==============================================================================
 *
 * All rights reserved.
 *
 * Developed by:
 *
 *     LLVM Team
 *
 *     University of Illinois at Urbana-Champaign
 *
 *     http://llvm.org
 *
 * ==============================================================================
 * Copyrights and Licenses for Third Party Software Distributed with LLVM:
 * ==============================================================================
 *
 * The following pieces of software have additional or alternate copyrights,
 * licenses, and/or restrictions:
 *
 * Program             Directory
 * -------             ---------
 * Autoconf            llvm/autoconf
 *                     llvm/projects/ModuleMaker/autoconf
 * Google Test         llvm/utils/unittest/googletest
 * OpenBSD regex       llvm/lib/Support/{reg*, COPYRIGHT.regex}
 * pyyaml tests        llvm/test/YAMLParser/{*.data, LICENSE.TXT}
 * ARM contributions   llvm/lib/Target/ARM/LICENSE.TXT
 * md5 contributions   llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h
 */
package org.clang.frontend.impl;

import org.clank.support.*;
import org.llvm.adt.*;
import org.clang.serialization.*;
import org.clang.frontend.*;

// / Private implementations for ModuleDependencyCollector
@Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 28, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 26, FQN = "(anonymous namespace)::ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerE", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerE")
public class ModuleDependencyListener extends ASTReaderListener implements Destructors.ClassWithDestructor {

    private ModuleDependencyCollector Collector;

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 31, FQN = "(anonymous namespace)::ModuleDependencyListener::ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerC1ERN5clang25ModuleDependencyCollectorE", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerC1ERN5clang25ModuleDependencyCollectorE")
    public ModuleDependencyListener(ModuleDependencyCollector Collector) {
        // START JInit
        super();
        this.Collector = Collector;
        // END JInit
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 33, FQN = "(anonymous namespace)::ModuleDependencyListener::needsInputFileVisitation", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener24needsInputFileVisitationEv", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener24needsInputFileVisitationEv")
    @Override
    public boolean needsInputFileVisitation() /* override*/
    {
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 34, FQN = "(anonymous namespace)::ModuleDependencyListener::needsSystemInputFileVisitation", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener30needsSystemInputFileVisitationEv", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener30needsSystemInputFileVisitationEv")
    @Override
    public boolean needsSystemInputFileVisitation() /* override*/
    {
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 35, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 87, FQN = "(anonymous namespace)::ModuleDependencyListener::visitInputFile", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener14visitInputFileEN4llvm9StringRefEbbb", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener14visitInputFileEN4llvm9StringRefEbbb")
    @Override
    public boolean visitInputFile(StringRef Filename, boolean IsSystem, boolean IsOverridden, boolean IsExplicitModule) /* override*/
    {
        Collector.addFile(new StringRef(Filename));
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 28, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 26, FQN = "(anonymous namespace)::ModuleDependencyListener::~ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerD0Ev", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerD0Ev")
    @Override
    public /*inline*/
    void $destroy() {
        super.$destroy();
    }

    @Override
    public String toString()


/**
 * This file was converted to Java from the original LLVM source file. The original
 * source file follows the LLVM Release License, outlined below.
 *
 * ==============================================================================
 *
 * All rights reserved.
 *
 * Developed by:
 *
 *     LLVM Team
 *
 *     University of Illinois at Urbana-Champaign
 *
 *     http://llvm.org
 *
 * ==============================================================================
 * Copyrights and Licenses for Third Party Software Distributed with LLVM:
 * ==============================================================================
 *
 * The following pieces of software have additional or alternate copyrights,
 * licenses, and/or restrictions:
 *
 * Program             Directory
 * -------             ---------
 * Autoconf            llvm/autoconf
 *                     llvm/projects/ModuleMaker/autoconf
 * Google Test         llvm/utils/unittest/googletest
 * OpenBSD regex       llvm/lib/Support/{reg*, COPYRIGHT.regex}
 * pyyaml tests        llvm/test/YAMLParser/{*.data, LICENSE.TXT}
 * ARM contributions   llvm/lib/Target/ARM/LICENSE.TXT
 * md5 contributions   llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h
 */
package org.clang.frontend.impl;

import org.clank.support.*;
import org.llvm.adt.*;
import org.clang.serialization.*;
import org.clang.frontend.*;

// / Private implementations for ModuleDependencyCollector
@Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 28, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 26, FQN = "(anonymous namespace)::ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerE", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerE")
public class ModuleDependencyListener extends ASTReaderListener implements Destructors.ClassWithDestructor {

    private ModuleDependencyCollector Collector;

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 31, FQN = "(anonymous namespace)::ModuleDependencyListener::ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerC1ERN5clang25ModuleDependencyCollectorE", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerC1ERN5clang25ModuleDependencyCollectorE")
    public ModuleDependencyListener(ModuleDependencyCollector Collector) {
        // START JInit
        super();
        this.Collector = Collector;
        // END JInit
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 33, FQN = "(anonymous namespace)::ModuleDependencyListener::needsInputFileVisitation", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener24needsInputFileVisitationEv", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener24needsInputFileVisitationEv")
    @Override
    public boolean needsInputFileVisitation() /* override*/
    {
        return tr

    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 34, FQN = "(anonymous namespace)::ModuleDependencyListener::needsSystemInputFileVisitation", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener30needsSystemInputFileVisitationEv", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener30needsSystemInputFileVisitationEv")
    @Override
    public boolean needsSystemInputFileVisitation() /* override*/
    {
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 35, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 87, FQN = "(anonymous namespace)::ModuleDependencyListener::visitInputFile", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListener14visitInputFileEN4llvm9StringRefEbbb", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListener14visitInputFileEN4llvm9StringRefEbbb")
    @Override
    public boolean visitInputFile(StringRef Filename, boolean IsSystem, boolean IsOverridden, boolean IsExplicitModule) /* override*/
    {
        Collector.addFile(new StringRef(Filename));
        return true;
    }

    @Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", line = 28, old_source = "${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", old_line = 26, FQN = "(anonymous namespace)::ModuleDependencyListener::~ModuleDependencyListener", NM = "_ZN12_GLOBAL__N_124ModuleDependencyListenerD0Ev", cmd = "jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp -nm=_ZN12_GLOBAL__N_124ModuleDependencyListenerD0Ev")
    @Override
    public /*inline*/
    void $destroy() {
        super.$destroy();
    }

    @Override
    public String toString() {
        return // NOI18N
        "" + "Collector=" + Collector + // NOI18N
        super.toString();
    }
}


package com.alibaba.nacos.naming.healthcheck.v2.processor;

import com.alibaba.nacos.naming.core.v2.metadata.ClusterMetadata;
import com.alibaba.nacos.naming.core.v2.pojo.Service;
import com.alibaba.nacos.naming.healthcheck.NoneHealthCheckProcessor;
import com.alibaba.nacos.naming.healthcheck.extend.HealthCheckExtendProvider;
import com.alibaba.nacos.naming.healthcheck.v2.HealthCheckTaskV2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * Delegate of health check v2.x.
 *
 * @author nacos
 */
@Component("healthCheckDelegateV2")
public class HealthCheckProcessorV2Delegate implements HealthCheckProcessorV2 {

    private final Map<String, HealthCheckProcessorV2> healthCheckProcessorMap = new HashMap<>();

    public HealthCheckProcessorV2Delegate(HealthCheckExtendProvider provider) {
        provider.init();
    }

    @Autowired
    public void addProcessor(Collection<HealthCheckProcessorV2> processors) {
        healthCheckProcessorMap.putAll(processors.stream().filter(processor -> processor.getType() != null).collect(Collectors.toMap(HealthCheckProcessorV2::getType, processor -> processor)));
    }

    @Override
    public void process(HealthCheckTaskV2 task, Service service, ClusterMetadata metadata) {
        String type = metadata.getHealthyCheckType();
        HealthCheckProcessorV2 processor = healthCheckProcessorMap.get(type);
        if (processor == null) {
            processor = healthCheckProcessorMap.get(NoneHealthCheckProcessor.TYPE);
        }
        processor.process(task, service, metadata);
    }