小编Yog*_*dra的帖子

Angular APP_INITIALIZER在测试中加载配置文件

我正在使用此要点在应用程序启动期间读取配置文件.这工作正常但在进行单元测试时我得到错误Cannot read property 'SomeProperty' of null.

我已经添加了提供程序以进行测试

beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ LoginComponent ],
      imports: [ReactiveFormsModule, RouterTestingModule, HttpModule],
      providers: [AuthService,
        SettingsService,
        AppConfig,
        {
            provide: APP_INITIALIZER,
            useFactory: initConfig,
            deps: [AppConfig],
            multi: true
        },
        ]
    })
    .compileComponents();
  }));
Run Code Online (Sandbox Code Playgroud)

任何指针来解决这个问题?提前致谢.

angular

7
推荐指数
2
解决办法
1381
查看次数

hive 0.13 msck修复表仅列出不在Metastore中的分区

我正在尝试使用Hive(0.13)msck repair table命令来恢复分区,它只列出未添加到Metastore的分区,而不是将它们添加到Metastore中.

这是命令的输出

partitions not in metastore externalexample:CreatedAt=26 04%3A50%3A56 UTC 2014/profileLocation="Chicago"
Run Code Online (Sandbox Code Playgroud)

这是我如何创建外部表

CREATE EXTERNAL TABLE IF NOT EXISTS ExternalExample(
        tweetId BIGINT, username STRING,
        txt STRING, CreatedAt STRING,
        profileLocation STRING,
        favc BIGINT,retweet STRING,retcount BIGINT,followerscount BIGINT)
    COMMENT 'This is the Twitter streaming data'
    ROW FORMAT DELIMITED
    FIELDS TERMINATED BY '\t'
    STORED AS TEXTFILE
    location '/user/hue/exttable/';
Run Code Online (Sandbox Code Playgroud)

我错过了什么吗?

hive hiveql hadoop2

5
推荐指数
4
解决办法
2万
查看次数

在 Windows 上使用 miniDFSCluster 时出错

我正在尝试使用 miniDFSCluster 编写单元测试,但它抛出以下错误

java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z

有解决这个问题的建议吗?

hdfs hadoop2

5
推荐指数
1
解决办法
1732
查看次数

标签 统计

hadoop2 ×2

angular ×1

hdfs ×1

hive ×1

hiveql ×1