Format a hash map of information about the OpenTSDB version
@param version A hash map with version information
@return A ChannelBuffer object to pass on to the caller
@throws BadRequestException if the plugin has not implemented this method
434021
public ChannelBuffer formatVersionV1(final Map<String, String> version) {
    throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, 
        "The requested API endpoint has not been implemented", 
        this.getClass().getCanonicalName() + 
        " has not implemented formatVersionV1");
  }
829635
public TableMetadata insertMetadata(String tableName, String version){
		TableMetadata result = new TableMetadata(this);
		result.setId(new Long(tableName.hashCode()));
		result.setName(tableName);
		result.setVersion(version);
		
		try{
			insertStatement.setLong(1, result.getId());
			insertStatement.setString(2, result.getName());
			insertStatement.setString(3, result.getVersion());
			insertStatement.executeUpdate();
		}catch(SQLException e){
			throw new BackendException("Could not insert new metadata-entry: " + result, e);
		}
		
		return result;
		
	}
37317
public static int getVersion(String version) {

        int ver = Integer.parseInt(version);
        return Math.abs(ver);
    }
164481
@InterfaceAudience.Public
    public boolean setMap(Mapper mapBlock, String version) {
        return setMapReduce(mapBlock, null, version);
    }
985608
private String formatVersion(String version) {
        if (version == null) {
            return version;
        }
        String[] split = version.split(GERRIT_VERSION_PREFIX);
        if (split.length < 2) {
            return version.trim();
        }
        return split[1].trim();
    }
847953
public ChannelBuffer formatLastPointQueryV1(
      final List<IncomingDataPoint> data_points) {
    throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, 
        "The requested API endpoint has not been implemented", 
        this.getClass().getCanonicalName() + 
        " has not implemented formatLastPointQueryV1");
  }
101785
public static boolean isValidVersion(final String version) {
        return StringUtils.isNotBlank(version)
                && (ALTERNATE_PATTERN.matcher(version).matches() || STANDARD_PATTERN
                        .matcher(version).matches());
    }
35941
public static String[] mappingGroovyName(String url,String version) {
		Iterator it = urlMap.entrySet().iterator();
		while (it.hasNext()) {
			Entry entry = (Entry) it.next();

			String key = (String) entry.getKey();
			if(key.equals(url)){
				MicroUrlBean urlBean=(MicroUrlBean) entry.getValue();
				if(version==null || "".equals(version)){
					return urlBean.getDefaultInfo();
				}else{
					version=versionFormat(version);
				}
				Entry fEntry=urlBean.getTreeMap().floorEntry(version);
				String[] ret=null;
				if(fEntry!=null){
					ret=(String[]) fEntry.getValue();
				}
				return ret;
			}
		}
		return null;
	}
142491
public ChannelBuffer formatQueryStatsV1(final Map<String, Object> query_stats) {
    throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, 
        "The requested API endpoint has not been implemented", 
        this.getClass().getCanonicalName() + 
        " has not implemented formatQueryStatsV1");
  }
1201390
public MUCLightRoomInfo getFullInfo(String version)
            throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        MUCLightGetInfoIQ mucLightGetInfoIQ = new MUCLightGetInfoIQ(room, version);

        IQ responseIq = connection.createStanzaCollectorAndSend(mucLightGetInfoIQ).nextResultOrThrow();
        MUCLightInfoIQ mucLightInfoResponseIQ = (MUCLightInfoIQ) responseIq;

        return new MUCLightRoomInfo(mucLightInfoResponseIQ.getVersion(), room,
                mucLightInfoResponseIQ.getConfiguration(), mucLightInfoResponseIQ.getOccupants());
    }
647778
public long getProtocolVersion(String protocol,
                                 long clientVersion) throws IOException {
    if (protocol.equals(AvatarProtocol.class.getName())) {
      return AvatarProtocol.versionID;
    } else {
      return super.getProtocolVersion(protocol, clientVersion);
    } 
  }
85081
public ArrayList<String> license_sqlserver_serviceName_upgrade_GET(String serviceName, OvhSqlServerVersionEnum version) throws IOException {
		String qPath = "/order/license/sqlserver/{serviceName}/upgrade";
		StringBuilder sb = path(qPath, serviceName);
		query(sb, "version", version);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t1);
	}
837920
public static final ClientVersionAlreadyExistsException clientVersionAlreadyExistsException(String clientName, String version) {
        return new ClientVersionAlreadyExistsException(Messages.i18n.format("clientVersionAlreadyExists", clientName, version)); //$NON-NLS-1$
    }
756755
protected String getSql(int version){
        Dialect dialect = ((SqlManagerImpl) sqlManager).getDialect();
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        InputStream in = classLoader.getResourceAsStream(
                String.format("%s/%s_%d.sql", packageName, dialect.getName().toLowerCase(), version));

        if(in == null){
            in = classLoader.getResourceAsStream(
                    String.format("%s/%d.sql", packageName, version));

            if(in == null){
                return null;
            }
        }

        byte[] buf = IOUtil.readStream(in);
	
		return new String(buf, StandardCharsets.UTF_8);
	
	}
1181499
public Map<String, String> getControls(Version serverVersion) {
    final CompressionMode effectiveMode = compression(serverVersion);

    if (compressionMode != effectiveMode) {
      LOGGER.info("Couchbase Server version {} does not support {} compression mode; falling back to {}.",
          serverVersion, compressionMode, effectiveMode);
    } else {
      LOGGER.debug("Compression mode: {}", compressionMode);
    }

    final Map<String, String> result = new HashMap<>(values);
    result.putAll(effectiveMode.getDcpControls(serverVersion));
    return result;
  }
774004
public static Version parseVersion(String version) {
		if (!Strings.isNullOrEmpty(version)) {
			try {
				return Version.parseVersion(version);
			} catch (Throwable exception) {
				//
			}
		}
		return null;
	}
406726
public Version parseVersion(final String version) {
    checkNotNull(version);
    try {
      return versionScheme.parseVersion(version);
    }
    catch (InvalidVersionSpecificationException e) {
      throw Throwables.propagate(e);
    }
  }