微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在 ubuntu 20.04 上安装 OpenTSDB

如何解决如何在 ubuntu 20.04 上安装 OpenTSDB

我尝试在本地安装 OpenTSDB 2.4。 环境:

  • Ubuntu 20.04
  • openjdk 16.0.1 2021-04-20
  • OpenJDK 运行时环境(构建 16.0.1+9-Ubuntu-120.04)
  • OpenJDK 64 位服务器 VM(构建 16.0.1+9-Ubuntu-120.04,混合模式,共享)
  • javac 16.0.1

当我运行 ./build.sh, 时,我遇到了这个问题:

warning: [options] bootstrap class path not set in conjunction with -source 6
error: Source option 6 is no longer supported. Use 7 or later.
make[1]: *** [Makefile:1853: .javac-stamp] Error 2
make[1]: Leaving directory '/home/vhirk/go/src/github.com/test/adiitional-scripts/opentsdb/opentsdb/build'
make: *** [Makefile:1411: all] Error 2

我在 source 6 中更改 source 7 -> Makefile.in解决了这个问题。

此后我遇到了这个问题:

../src/core/HistogramPojo.java:19: error: package javax.xml.bind does not exist
import javax.xml.bind.DatatypeConverter;
                     ^
../src/query/expression/IntersectionIterator.java:30: warning: NotImplementedException is internal proprietary API and may be removed in a future release
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
                                             ^
../src/query/expression/UnionIterator.java:30: warning: NotImplementedException is internal proprietary API and may be removed in a future release
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
                                             ^
../src/tree/Branch.java:25: error: package javax.xml.bind does not exist
import javax.xml.bind.DatatypeConverter;
                     ^
../src/uid/UniqueId.java:309: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public long maxPossibleId() {
              ^
../src/uid/UniqueId.java:594: warning: [rawtypes] found raw type: Deferred
      final Deferred d;
            ^
  missing type arguments for generic class Deferred<T>
  where T is a type-variable:
    T extends Object declared in class Deferred
../src/uid/UniqueId.java:1412: error: cannot find symbol
    return DatatypeConverter.printHexBinary(uid);
           ^
  symbol:   variable DatatypeConverter
  location: class UniqueId
../src/uid/UniqueId.java:1563: error: cannot find symbol
    return DatatypeConverter.parseHexBinary(id);
           ^
  symbol:   variable DatatypeConverter
  location: class UniqueId
../src/rollup/RollupInterval.java:240: warning: [cast] redundant cast to int
    intervals = num_span / (int)interval;
                           ^
../src/core/HistogramCodecManager.java:117: warning: [deprecation] newInstance() in Class has been deprecated
        codec = (HistogramDataPointCodec) clazz.newInstance();
                                               ^
  where T is a type-variable:
    T extends Object declared in class Class
../src/core/HistogramDataPoint.java:83: warning: [overrides] Class HistogramBucket overrides equals,but neither it nor any superclass overrides hashCode method
  public class HistogramBucket implements KryoSerializable,Comparable<HistogramBucket> {
         ^
../src/core/TSSubQuery.java:287: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public Aggregator downsampler() {
                    ^
../src/core/TSSubQuery.java:293: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public long downsampleInterval() {
              ^
../src/core/TSSubQuery.java:330: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public Map<String,String> getTags() {
                             ^
../src/core/TSSubQuery.java:430: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public void setTags(Map<String,String> tags) {
              ^
../src/core/DownsamplingSpecification.java:82: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public DownsamplingSpecification(final long interval,^
../src/core/TsdbQuery.java:651: warning: [deprecation] DownsamplingSpecification(long,Aggregator,FillPolicy) in DownsamplingSpecification has been deprecated
    this.downsampler = new DownsamplingSpecification(
                       ^
../src/core/TsdbQuery.java:1407: warning: [deprecation] DownsamplingSpecification(long,FillPolicy) in DownsamplingSpecification has been deprecated
              downsampler = new DownsamplingSpecification(
                            ^
../src/core/TsdbQuery.java:1777: warning: [deprecation] DownsamplingSpecification(long,FillPolicy) in DownsamplingSpecification has been deprecated
      downsampler = new DownsamplingSpecification(
                    ^
../src/utils/ByteSet.java:83: warning: [unchecked] unchecked cast
      new_set.map = (ByteMap<Object>) map.clone();
                                               ^
  required: ByteMap<Object>
  found:    Object
../src/core/Span.java:501: warning: [deprecation] Downsampler(SeekableView,long,Aggregator) in Downsampler has been deprecated
      return new Downsampler(spanIterator(),interval_ms,downsampler);
             ^
../src/core/Span.java:505: warning: [deprecation] FillingDownsampler(SeekableView,FillPolicy) in FillingDownsampler has been deprecated
      return new FillingDownsampler(spanIterator(),start_time,end_time,^
../src/core/Downsampler.java:76: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  Downsampler(final SeekableView source,^
../src/core/Histogram.java:28: warning: [rawtypes] found raw type: Map
  public Map getHistogram();
         ^
  missing type arguments for generic class Map<K,V>
  where K,V are type-variables:
    K extends Object declared in interface Map
    V extends Object declared in interface Map
../src/core/FillingDownsampler.java:56: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  FillingDownsampler(final SeekableView source,final long start_time,^
../src/core/HistogramPojo.java:147: error: cannot find symbol
    return DatatypeConverter.printBase64Binary(raw);
           ^
  symbol:   variable DatatypeConverter
  location: class HistogramPojo
../src/core/HistogramPojo.java:151: error: cannot find symbol
    return DatatypeConverter.parseBase64Binary(encoded);
           ^
  symbol:   variable DatatypeConverter
  location: class HistogramPojo
../src/core/SimpleHistogram.java:250: warning: [unchecked] unchecked cast
        (Set<Map.Entry<HistogramBucket,Long>>) histo.getHistogram().entrySet()) {
                                                                             ^
  required: Set<Entry<HistogramBucket,Long>>
  found:    Set
../src/core/MultiGetQuery.java:950: warning: [cast] redundant cast to Span
      Span datapoints = (Span) spans.get(key);
                        ^
../src/core/Spangroup.java:194: warning: [deprecation] DownsamplingSpecification(long,FillPolicy) in DownsamplingSpecification has been deprecated
             new DownsamplingSpecification(interval,downsampler,fill_policy) : 
             ^
../src/Meta/TSUIDQuery.java:93: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public TSUIDQuery(final TSDB tsdb) {
         ^
../src/Meta/TSUIDQuery.java:227: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public void setQuery(final String metric,final Map<String,String> tags) {
              ^
../src/Meta/TSUIDQuery.java:551: warning: [dep-ann] deprecated item is not annotated with @Deprecated
  public static Deferred<IncomingDataPoint> getLastPoint(final TSDB tsdb,^
../src/query/expression/IntersectionIterator.java:448: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/IntersectionIterator.java:453: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/IntersectionIterator.java:458: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/IntersectionIterator.java:463: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/IntersectionIterator.java:483: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/IntersectionIterator.java:488: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/IntersectionIterator.java:493: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/UnionIterator.java:341: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/UnionIterator.java:360: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/UnionIterator.java:365: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/UnionIterator.java:370: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/query/expression/UnionIterator.java:390: warning: NotImplementedException is internal proprietary API and may be removed in a future release
    throw new NotImplementedException();
              ^
../src/tools/ConfigArgP.java:128: warning: [deprecation] reader(Class<?>) in ObjectMapper has been deprecated
      final ConfigurationItem[] loadedItems = jsonMapper.reader(ConfigurationItem[].class).readValue(configRoot);
                                                        ^
../src/tools/ConfigArgP.java:825: warning: [deprecation] reader(Class<?>) in ObjectMapper has been deprecated
          String[] jsLines = jsonMapper.reader(String[].class).readValue(bindingsNode);
                                       ^
../src/tree/Branch.java:586: error: cannot find symbol
    return DatatypeConverter.printHexBinary(branch_id);
           ^
  symbol:   variable DatatypeConverter
  location: class Branch
../src/tree/Branch.java:606: error: cannot find symbol
    return DatatypeConverter.parseHexBinary(id);
           ^
  symbol:   variable DatatypeConverter
  location: class Branch
../src/tsd/AbstractHttpQuery.java:478: warning: [deprecation] toStringHelper(Object) in Objects has been deprecated
    return Objects.toStringHelper(this)
                  ^
../src/tsd/QueryRpc.java:430: warning: [deprecation] getLastPoint(TSDB,byte[],boolean,int,long) in TSUIDQuery has been deprecated
          deferreds.add(TSUIDQuery.getLastPoint(tsdb,entry.getKey(),^
../src/tsd/GraphHandler.java:198: warning: [deprecation] decode(String) in URLDecoder has been deprecated
          allow = URLDecoder.decode(allow.trim());
                            ^
../src/tsd/GraphHandler.java:239: warning: [rawtypes] found raw type: HashSet
    final HashSet<String>[] aggregated_tags = new HashSet[nqueries];
                                                  ^
  missing type arguments for generic class HashSet<E>
  where E is a type-variable:
    E extends Object declared in class HashSet
../src/tsd/GraphHandler.java:668: warning: [deprecation] decode(String) in URLDecoder has been deprecated
      wxh = URLDecoder.decode(wxh.trim());
                      ^
../src/tsd/GraphHandler.java:725: warning: [deprecation] decode(String) in URLDecoder has been deprecated
      given = URLDecoder.decode(given.trim());
                        ^
../src/tsd/LogsRpc.java:115: warning: [cast] redundant cast to ILoggingEvent
        final ILoggingEvent event = (ILoggingEvent) logbuf.get(nevents);
                                    ^
../src/tsd/QueryExecutor.java:854: warning: [rawtypes] found raw type: Map
      tags = new Map[dps.length];
                 ^
  missing type arguments for generic class Map<K,V are type-variables:
    K extends Object declared in interface Map
    V extends Object declared in interface Map
../src/tsd/QueryExecutor.java:855: warning: [rawtypes] found raw type: List
      agg_tags = new List[dps.length];
                     ^
  missing type arguments for generic class List<E>
  where E is a type-variable:
    E extends Object declared in interface List
../src/utils/JSON.java:214: warning: [deprecation] createJsonParser(String) in JsonFactory has been deprecated
      return jsonMapper.getFactory().createJsonParser(json);
                                    ^
../src/utils/JSON.java:236: warning: [deprecation] createJsonParser(byte[]) in JsonFactory has been deprecated
      return jsonMapper.getFactory().createJsonParser(json);
                                    ^
../src/utils/JSON.java:258: warning: [deprecation] createJsonParser(InputStream) in JsonFactory has been deprecated
      return jsonMapper.getFactory().createJsonParser(json);
                                    ^
../src/utils/PluginLoader.java:70: warning: [rawtypes] found raw type: Class
  private static final Class<?>[] ParaMETER_TYPES = new Class[] {
                                                        ^
  missing type arguments for generic class Class<T>
  where T is a type-variable:
    T extends Object declared in class Class
./src/net/opentsdb/query/expression/parser/TokenMgrError.java:110: warning: [cast] redundant cast to int
          (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + (int)curChar + "),") +
                                                                                              ^
9 errors
58 warnings
make[1]: *** [Makefile:1853: .javac-stamp] Error 1
make[1]: Leaving directory '/home/vhirk/go/src/github.com/test/adiitional-scripts/opentsdb/opentsdb/build'
make: *** [Makefile:1411: all] Error 2

有人知道如何解决这个问题吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。