Export schema handles the handleOperation method.

@param hbase
487672
protected void exportSchema(final String persistenceUnit, List<TableInfo> tables)
    {
        // Get persistence unit metadata
        this.puMetadata = kunderaMetadata.getApplicationMetadata().getPersistenceUnitMetadata(persistenceUnit);
        String paramString = externalProperties != null ? (String) externalProperties
                .get(PersistenceProperties.KUNDERA_CLIENT_FACTORY) : null;
        if (clientFactory != null
                && ((clientFactory.equalsIgnoreCase(puMetadata.getProperties().getProperty(
                        PersistenceProperties.KUNDERA_CLIENT_FACTORY))) || (paramString != null && clientFactory
                        .equalsIgnoreCase(paramString))))
        {
            readConfigProperties(puMetadata);

            // invoke handle operation.
            if (operation != null && initiateClient())
            {
                tableInfos = tables;
                handleOperations(tables);
            }
        }
    }
752541
private void convertDatabase(){
        sendConsoleMessage(Level.INFO, getLanguageManager().getString("starting_database_convert"));
        new H2ToMySQLConverter().run();
        sendConsoleMessage(Level.INFO, getLanguageManager().getString("convert_done"));
        getMainConfig().setValue("System.Database.ConvertFromH2", false);
    }
803946
public static function execute(Schema $schema, $root, Document $ast, $operation = NULL, array $args = NULL)
    {
        if (!self::$UNDEFINED) {
            self::$UNDEFINED = new \stdClass();
        }

        try {
            $errors = new \ArrayObject();
            $context = self::buildExecutionContext($schema, $root, $ast, $operation, $args, $errors);
            $data = self::executeOperation($context, $root, $context->operation);
        } catch (\Exception $e) {
            $errors[] = $e;
        }

        $result = ['data' => isset($data) ? $data : NULL];
        if (count($errors) > 0) {
            $result['errors'] = $errors->getArrayCopy();
        }

        return $result;
    }
979238
@Override
    public void writeData(String tableName, EntityMetadata m, Object entity, Object rowId,
            List<RelationHolder> relations, boolean showQuery) throws IOException
    {
        HBaseRow hbaseRow = createHbaseRow(m, entity, rowId, relations);
        writeHbaseRowInATable(tableName, hbaseRow);
    }
118718
@Override
  public void closeOperation(OperationHandle opHandle)
      throws HiveSQLException {
    try {
      TCloseOperationReq req  = new TCloseOperationReq(opHandle.toTOperationHandle());
      TCloseOperationResp resp = cliService.CloseOperation(req);
      checkStatus(resp.getStatus());
    } catch (HiveSQLException e) {
      throw e;
    } catch (Exception e) {
      throw new HiveSQLException(e);
    }
  }
1367289
public void evolve(SchemaOperation op) {
		//TODO this is horrible!!!
		ArrayList<Object> fV = new ArrayList<Object>(Arrays.asList(fixedValues));
		ArrayList<Object> vV = new ArrayList<Object>(Arrays.asList(variableValues));
		
		//TODO resize only once to correct size
		if (op instanceof SchemaOperation.SchemaFieldDefine) {
			SchemaOperation.SchemaFieldDefine op2 = (SchemaFieldDefine) op;
			int fieldId = op2.getField().getFieldPos();
			fV.add(fieldId, PersistentSchemaOperation.getDefaultValue(op2.getField()));
			vV.add(fieldId, null);
		}
		if (op instanceof SchemaOperation.SchemaFieldDelete) {
			SchemaOperation.SchemaFieldDelete op2 = (SchemaFieldDelete) op;
			int fieldId = op2.getField().getFieldPos();
			fV.remove(fieldId);
			vV.remove(fieldId);
		}
		fixedValues = fV.toArray(fixedValues);
		variableValues = vV.toArray(variableValues);
	}
156221
private void understandSchema(String schema) throws JSONException {

    JSONObject j1 = new JSONObject(schema);
    JSONArray fields = j1.getJSONArray(FIELDS);

    String fieldName;
    String fieldTypeValue;
    Object recName;

    for (int k = 0; k < fields.length(); k++) {
      if (fields.get(k) == null) {
        continue;
      }
      JSONObject allEvents = new JSONObject(fields.get(k).toString());
      Object name = allEvents.get(NAME);
      if (name != null) {
        if (name.toString().equalsIgnoreCase(EVENT)) {
          JSONArray allTypeDetails = allEvents.getJSONArray(TYPE);
          for (int i = 0; i < allTypeDetails.length(); i++) {
            JSONObject actual = (JSONObject) allTypeDetails.get(i);
            JSONArray types = actual.getJSONArray(FIELDS);
            Map<String, String> typeDetails = new HashMap<String, String>();
            for (int j = 0; j < types.length(); j++) {
              if (types.getJSONObject(j) == null ) {
                continue;
              }
              fieldName = types.getJSONObject(j).getString(NAME);
              fieldTypeValue = types.getJSONObject(j).getString(TYPE);
              if ((fieldName != null) && (fieldTypeValue != null)) {
                typeDetails.put(fieldName, fieldTypeValue);
              }
            }

            recName = actual.get(NAME);
            if (recName != null) {
              /* the next statement may throw an IllegalArgumentException if
               * it finds a new string that's not part of the Hadoop2RecordType enum
               * that way we know what types of events we are parsing
               */
              fieldTypes.put(Hadoop2RecordType.valueOf(recName.toString()), typeDetails);
            }
          }
        }
      }
    }
  }
1225054
public void dropSchema()
    {
        if (operation != null && operation.equalsIgnoreCase("create-drop"))
        {
            try
            {
                HTableDescriptor hTableDescriptor = null;
                if (admin.isTableAvailable(databaseName))
                {
                    if (admin.isTableEnabled(databaseName))
                    {
                        hTableDescriptor = admin.getTableDescriptor(databaseName.getBytes());
                        admin.disableTable(databaseName);
                    }
                    for (TableInfo tableInfo : tableInfos)
                    {
                        if (tableInfo != null && tableInfo.getTableName() != null
                                && hTableDescriptor.getFamily(tableInfo.getTableName().getBytes()) != null)
                        {
                            admin.deleteColumn(databaseName, tableInfo.getTableName());
                        }
                    }
                }
            }
            catch (TableNotFoundException tnfe)
            {
                logger.error("Table doesn't exist, Caused by ", tnfe);
                throw new SchemaGenerationException(tnfe, "Hbase");
            }
            catch (IOException ioe)
            {
                logger.error("Table isn't in enabled state, Caused by", ioe);
                throw new SchemaGenerationException(ioe, "Hbase");
            }
            finally
            {
                try
                {
                    admin.enableTable(databaseName);
                }
                catch (IOException ioe)
                {
                    logger.error("Table isn't in enabled state, Caused by", ioe);
                    throw new SchemaGenerationException(ioe, "Hbase");
                }
            }
        }
        operation = null;
        admin = null;
    }
738611
protected void initDatabaseExportObject() {

        Object o;

        if (CmsStringUtil.isEmpty(getParamAction())) {
            o = new CmsExportParameters();
        } else {
            // this is not the initial call, get the job object from session
            o = getDialogObject();
        }

        if (!(o instanceof CmsExportParameters)) {
            // create a new export parameters object
            m_exportParams = new CmsExportParameters();
        } else {
            // reuse export parameters object stored in session
            m_exportParams = (CmsExportParameters)o;
        }

        if (CmsStringUtil.isEmpty(getParamAction()) && (m_exportParams.getResources().size() < 1)) {
            // on initial call, at least on resource input field has to be present
            List initialPaths = new ArrayList(1);
            initialPaths.add("/");
            m_exportParams.setResources(initialPaths);
        }
    }
711527
function handleAllOf(schema) {
  if (!schema.allOf) return schema;

  return reduceRight(
    schema.allOf,
    (acc, cur) => {
      return merge(acc, handleAllOf(cur));
    },
    {}
  );
}
1001044
private void handleCreate(TableInfo tableInfo, KsDef ksDef) throws Exception
    {
        if (containsCompositeKey(tableInfo))
        {
            validateCompoundKey(tableInfo);
            // First drop existing column family.
            dropTableUsingCql(tableInfo);
        }
        else
        {
            onDrop(tableInfo);
        }
        createOrUpdateColumnFamily(tableInfo, ksDef);
    }
654095
def export_datasource_schema(back_references):
    """"""
    data = dict_import_export.export_schema_to_dict(
        back_references=back_references)
    yaml.safe_dump(data, stdout, default_flow_style=False)
629953
@Override
    public Schema transform(Schema schema) {
        int nCols = schema.numColumns();
        List<String> colNames = schema.getColumnNames();
        List<ColumnMetaData> meta = schema.getColumnMetaData();
        List<ColumnMetaData> newMeta = new ArrayList<>(nCols);

        for (int i = 0; i < nCols; i++) {
            String name = colNames.get(i);
            ColumnMetaData inMeta = meta.get(i);

            if (keyColumnsSet != null && keyColumnsSet.contains(name)) {
                //No change to key columns
                newMeta.add(inMeta);
                continue;
            }

            //First: check for a custom reduction on this column
            if (customReductions != null && customReductions.containsKey(name)) {
                AggregableColumnReduction reduction = customReductions.get(name);

                List<String> outName = reduction.getColumnsOutputName(name);
                List<ColumnMetaData> outMeta = reduction.getColumnOutputMetaData(outName, inMeta);
                newMeta.addAll(outMeta);
                continue;
            }

            //Second: check for conditional reductions on this column:
            if (conditionalReductions != null && conditionalReductions.containsKey(name)) {
                ConditionalReduction reduction = conditionalReductions.get(name);

                List<String> outNames = reduction.getOutputNames();
                List<ReduceOp> reductions = reduction.getReductions();
                for (int j = 0; j < reduction.getReductions().size(); j++) {
                    ReduceOp red = reductions.get(j);
                    String outName = outNames.get(j);
                    ColumnMetaData m = getMetaForColumn(red, name, inMeta);
                    m.setName(outName);
                    newMeta.add(m);
                }
                continue;
            }


            //Otherwise: get the specified (built-in) reduction op
            //If no reduction op is specified for that column: use the default
            List<ReduceOp> lop = opMap.containsKey(name) ? opMap.get(name) : Collections.singletonList(defaultOp);
            if (lop != null)
                for (ReduceOp op : lop) {
                    newMeta.add(getMetaForColumn(op, name, inMeta));
                }
        }

        return schema.newSchema(newMeta);
    }
126114
private void handleExpressionQuery(final TSDB tsdb, final HttpQuery query) {
    final net.opentsdb.query.pojo.Query v2_query = 
        JSON.parseToObject(query.getContent(), net.opentsdb.query.pojo.Query.class);
    v2_query.validate();

    checkAuthorization(tsdb, query.channel(), v2_query);

    final QueryExecutor executor = new QueryExecutor(tsdb, v2_query);
    executor.execute(query);
  }
828714
public void execute() {
        try {
            new JdbcTemplate(dataSource).execute(readResourceContent(SCHEMA_FILE)); // TODO: sql independence
        } catch (IOException e) {
            throw new RuntimeException("Could not create schema for EDBI Index", e);
        }
    }
1154426
@Override
  public RecordStreamWithMetadata<DO, SO> processStream(RecordStreamWithMetadata<DI, SI> inputStream,
      WorkUnitState workUnitState) throws SchemaConversionException {
    init(workUnitState);
    this.outputGlobalMetadata = GlobalMetadata.<SI, SO>builderWithInput(inputStream.getGlobalMetadata(),
        Optional.fromNullable(convertSchema(inputStream.getGlobalMetadata().getSchema(), workUnitState))).build();
    Flowable<StreamEntity<DO>> outputStream =
        inputStream.getRecordStream()
            .flatMap(in -> {
              if (in instanceof ControlMessage) {
                ControlMessage out = (ControlMessage) in;

                getMessageHandler().handleMessage((ControlMessage) in);

                // update the output schema with the new input schema from the MetadataUpdateControlMessage
                if (in instanceof MetadataUpdateControlMessage) {
                  this.outputGlobalMetadata = GlobalMetadata.<SI, SO>builderWithInput(
                      ((MetadataUpdateControlMessage) in).getGlobalMetadata(),
                      Optional.fromNullable(convertSchema((SI)((MetadataUpdateControlMessage) in).getGlobalMetadata()
                          .getSchema(), workUnitState))).build();
                  out = new MetadataUpdateControlMessage<SO, DO>(this.outputGlobalMetadata);
                }

                return Flowable.just(((ControlMessage<DO>) out));
              } else if (in instanceof RecordEnvelope) {
                RecordEnvelope<DI> recordEnvelope = (RecordEnvelope<DI>) in;
                return convertRecordEnvelope(this.outputGlobalMetadata.getSchema(), recordEnvelope, workUnitState);
              } else {
                throw new UnsupportedOperationException();
              }
            }, 1);
    outputStream = outputStream.doOnComplete(this::close);
    return inputStream.withRecordStream(outputStream, this.outputGlobalMetadata);
  }
1325828
@Override
    public void export(RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException {
        exportStatements(null, null, null, true, handler);
    }