我正在使用此要点在应用程序启动期间读取配置文件.这工作正常但在进行单元测试时我得到错误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)
任何指针来解决这个问题?提前致谢.
我正在尝试使用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)
我错过了什么吗?
我正在尝试使用 miniDFSCluster 编写单元测试,但它抛出以下错误
java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
有解决这个问题的建议吗?